I just updated npm
to 5.4.0
.
Now, Whenever I want install a npm package I get the following error:
D:\\Sources\\DownloadCms\\Md
I had the same issue and all I needed to do was login to npm
npm login
or alternatively
npm add user
// consult the documentation for the params
After trying everything, including node/npm upgrade, cache cleaning and reverting code, nothing helped besides one simple thing: Turning OFF Windows 10's Real-time protection during the dev/build. Looks like latest updates made it super aggressive.
In my case, the problem was that, I did not install typescript. Although I did install Node and Angular. To check if you have installed typescript or not
Run this command: tsc -v
If not, then to install typescript
Run this command: npm install -g typescript
And, finally to install required dependencies
Run this command: npm install
in the root folder of the project.
---- Hope this helps someone ----
If all of the above failed to work for you, you might want to
Fixed in NPM 5.6.0
Upgrade to NPM 5.6.0 solved problem for me.
I tried this solution found at a How to fix Node.js blog
just use
npm cache clean
in windows if it refuses use
npm cache clean --force