Error: Cannot find module 'yargonaut'或者其他包名。
npm install yargonaut --global
後面--global參數不可少。否則安裝之後仍然可能報錯說包不存在。
如果仍然找不到,檢查一下軟件安裝的路徑和環境變量。
[root@...~]# which npm
.../npm
[root@...~]# which node
.../node
[root@...~]# echo $NODE_PATH
無計可施了,嘗試如下代碼
brew cleanup
brew link node
brew uninstall node
brew install node