npm 错误! cb.apply 不是函数

新手上路,请多包涵

我收到此错误

npm ERR! cb.apply is not a function

在Linux中做 npm install 虽然我的npm版本是6.9.0。我的节点版本是 v12.18.3。如何解决这个问题?

原文由 Janaki 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 927
1 个回答

如果您共享它是 Windows 还是 Linux,将会有所帮助,但错误似乎发生在 Windows 上。 可能的解决方案

 1. Go to C:\Users(your username)\AppData\Roaming
2. Delete the npm folder (possibly back it up) and if there is one npm cache folder.
3. Run `npm cache clear --force` (--force is now required to clean cache)

之后, npm install 应该可以正常工作。

原文由 Marek Piotrowski 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题