【发布时间】:2016-06-02 12:55:51
【问题描述】:
我在运行 El Capitan 的 Mac 上。我有节点 v5.6.0 和 npm v3.6.0。 当我尝试运行 nodemon 时,我得到:
-bash: nodemon: command not found
我认为这可能意味着我没有安装 nodemon,所以当我尝试使用...安装它时...
sudo npm install -g nodemon
...我明白了:
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "nodemon"
npm ERR! node v5.6.0
npm ERR! npm v3.6.0
npm ERR! path /usr/local/bin/nodemon
npm ERR! code EEXIST
npm ERR! Refusing to delete /usr/local/bin/nodemon: ../lib/node_modules/nodemon/nodemon.js symlink target is not controlled by npm /usr/local
npm ERR! File exists: /usr/local/bin/nodemon
npm ERR! Move it away, and try again.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/brianeoneill/npm-debug.log
如果有什么不同,我正在尝试在使用 Express v4.13.1 的项目上运行 nodemon
感谢您提供的任何帮助!
【问题讨论】:
-
在尝试全局重新安装之前,您是否已卸载 nodemon?
npm uninstall nodemon -
我试过了,但没有用。但是,我只是尝试了 sudo npm install -g --force nodemon,这似乎可以解决问题。谢谢你的帮助!!!!!!
-
也许我的解决方案可以帮助你;)stackoverflow.com/questions/46505121/…
标签: node.js bash express npm nodemon