我正在使用 npm update -g -yo
将 yeoman 更新到最新版本。但我总是收到此错误:npm ERR! cb() 从未调用过!
.
请注意,我最初安装了 Node ,然后我执行了npm cache clean -f
,然后使用 Homebrew 重新安装了它,brew install -g node
。而且我仍然遇到上面提到的相同错误。
所有这些都在 Mac 上的终端中进行。
有人可以给我建议吗?
非常感谢
最佳答案
请不要使用npm update -g
目前;还是坏了。
我建议卸载并重新安装 Node ,然后更新npm
并安装yo
:
brew uninstall node
brew install -g node
npm install -g npm@latest
npm install -g yo@latest
一般来说,当您想要更新全局包时,请使用 npm install -g <package>@latest
关于node.js - 更新 Yeoman 给出 cb 从未被调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28696711/