Possibly save 1 hour of your time: When you want to use node.js npm package manager to install dependencies, you may encounter the following error when you run:
npm install
Check your npm version:
npm -v
Revert to a version that works. I am using npm 5.0.4:
npm i -g npm@5.0.4
You can also check your any version dependency at global level:
npm list -g
If the above doesn’t work, then you can upgrade npm version to latest as follows:
npm install npm@latest -g
Related resource: https://github.com/npm/npm/issues/17671
Advertisements