NPM not working. Cannot find module 'strip ansi'

后端 未结 8 1892
小蘑菇
小蘑菇 2021-01-02 10:43

I just downloaded node but npm is not working. whenever I use a npm comman I get Error: cannot find module \'strip-ansi\'.

8条回答
  •  孤城傲影
    2021-01-02 10:58

    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 my AppData folder (for me on Windows, I found it in c:\Users\Me\AppData\Roaming\npm). Then I was able to run npm normally again.

    Hope that helps!

提交回复
热议问题