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
Deleting package-lock.json fixed it for me.
For me on Windows the problem was too long path length. I moved the project to a smaller length path and it worked.
This was the only thing that worked for me:
npm cache clean --force
npm install -g npm@latest --force
rm package-lock.json
npm i -force
cache clean and npm
update to latest with force work for me
npm cache clean --force
npm install -g npm@latest --force
I simply completely shutdown , NOT hibernated, my machine and restarted it. Ran the CMD as admin and used npm install command. It worked.
There seems to be many solutions out there that worked with downgrading npm versions. For me, the solution was
npm install -force
I tried the downgrading of npm versions, modifying my npm prefix config to match the npm directory, and clearing cache. None of these worked, but apparently they worked for others, so it may be worth a shot.