添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
飘逸的黄瓜  ·  int32 最大值 python-掘金·  7 月前    · 
强健的苹果  ·  c# - How to identify ...·  1 年前    · 
坚韧的熊猫  ·  Nacos 中配置 Map ...·  1 年前    · 
乖乖的牛腩  ·  ios - Google 400 ...·  1 年前    · 
礼貌的稀饭  ·  论文阅读 —— Graph ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams Is this a temporary problem? Can you reproduce it on other machines? Can you install any other NPM module? tadman Aug 30, 2016 at 16:19 I can not reproduce it on other machines since I dont know how I got this error. I cannot install any other npm module because I cannot enter any npm commands. user3799968 Aug 30, 2016 at 16:21 You've got a lot of problems if you can't enter any commands. Try reinstalling Node? I don't know what you've done, you haven't really said much here. tadman Aug 30, 2016 at 16:36 If you're new to Node you might want to find some community support to get someone to help familiarize you with how to use this tool. The IRC channel might be best. tadman Aug 30, 2016 at 16:43

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:

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
$ nvm install node
                This was the fix for me. Also, npm's cache is supposed to work fine nowadays (you get some info on this by trying to npm cache clean). IMO you should try this first if you're using webpack + typescript
– ljleb
                Aug 11, 2021 at 16:39
                I had a similar problem with different solutions. the resolve.modules were set to [path.resolve(__dirname, 'node_modules')... where the webpack config file was not in the root. When fixed this with ../node_modules instead it worked.
– Earth Engine
                May 2, 2022 at 22:27

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!

on mac i solved with: brew uninstall --force node; sudo rm -rf /usr/local/lib/node_modules/; brew install node – hariseldon78 Jul 18, 2018 at 17:52 Well i just shared what worked for me, eventually this is easy to test before reinstalling the whole thing. – htafoya Dec 19, 2019 at 17:58

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.