Primordials not defined :ReferenceError in Node.js

After installing node modules using npm install and trying to run gulp and suddenly a ReferenceError appears. Many developers reported this problem. This usually happens when the version of gulp and the node you are using doesn’t match. To be more specific Node 12 and Gulp 3 will not  work together. The solution for this problem is to upgrade gulp or downgrade Node to v11. Another option to solve the problem is to pin graceful-fs to version 4.2.2 which works with Node v12. An older version of graceful-fs will not work.For this find your package.json file and in that directory create an npm-shrinkwrap.json file. Paste the below given lines of code to the file.

{

  "dependencies": {

    "graceful-fs": {

        "version": "4.2.2"

     }

  }

}

Now run npm install. I will update the file we just created with some contents. This will fix the bug.