I just downloaded node but npm is not working. whenever I use a npm comman I get Error: cannot find module 'strip-ansi'.
相关问题
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- google-drive can't get push notifications
- Failed at the electron@1.8.2 postinstall script
- How to reimport module with ES6 import
- Webpack getting started, import error
相关文章
- node连接远程oracle报错
- How can make folder with Firebase Cloud Functions
- @angular-cli install fails with deprecated request
- node.js modify file data stream?
- How to resolve hostname to an ip address in node j
- Transactionally writing files in Node.js
- Log to node console or debug during webpack build
- Get file created date in node
Solved by doing
npm cache clean
and thennpm install
I hit this same issue. I tried to update npm after a fresh Node.js install, but cancelled in the middle because it appeared stuck. Reinstalling Node.js didn't help.
I resolved the issue by deleting the temporary
npm
files in myAppData
folder (for me on Windows, I found it inc:\Users\Me\AppData\Roaming\npm
). Then I was able to runnpm
normally again.Hope that helps!
Clear your temporary paths of npm and this is solution. if you're using linux:
go to $ cd /tmp/
search by npm-* folders
and remove all.
just reinstall strip using
npm install strip --save
this kind of error occurs because some file may be corrupt in strip library if this will not work you can try alsonpm install
you will solve this error.It solved for me by going to the NPM install folder at
/usr/local/lib/node_modules/npm
and running theyarn
command. After running it successfully, NPM started working normally.For what it's worth, this ended up happening to me, using nvm on mac.
npm cache clean
didn't work. I ended up reinstalling via nvm: