Skip to content

Instantly share code, notes, and snippets.

@Saabbir
Last active October 27, 2020 06:35
Show Gist options
  • Save Saabbir/5d8810dc3a21e16072d2672be19fb626 to your computer and use it in GitHub Desktop.
Save Saabbir/5d8810dc3a21e16072d2672be19fb626 to your computer and use it in GitHub Desktop.

How to fix "ReferenceError: primordials is not defined" error in NodeJS

Here's what you need to do:

Step 1

In the same directory where you have package.json create an npm-shrinkwrap.json file with the following contents:

{
  "dependencies": {
    "graceful-fs": {
      "version": "4.2.2"
    }
  }
}

Step 2

Run npm install, and don't worry, it'll update npm-shrinkwrap.json with a bunch of content.

Now, fire your gulp command and enjoy, it should be working just fine!

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment