nodemon不工作:-bash:nodemon:命令未找到 [英] nodemon not working: -bash: nodemon: command not found
本文介绍了nodemon不工作:-bash:nodemon:命令未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试运行nodemon时,我得到:
-bash:nodemon:command not found
我以为这可能意味着我没有安装nodemon,所以当我尝试使用...安装
sudo npm intall -g nodemon
...我得到这个:
npm ERR!达尔文15.2.0
npm ERR! argv/ usr / local / bin / node/ usr / local / bin / npminstall-gnodemon
npm ERR!节点v5.6.0
npm ERR! npm v3.6.0
npm ERR!路径/ usr / local / bin / nodemon
npm ERR!代码EEXIST
npm ERR!拒绝删除/ usr / local / bin / nodemon:../lib/node_modules/nodemon/nodemon.js符号链接目标不受npm / usr / local
npm ERR的控制!文件存在:/ usr / local / bin / nodemon
npm ERR!将其移开,然后重试。
npm ERR!请包含以下文件与任何支持请求:
npm ERR! /Users/brianeoneill/npm-debug.log
如果它有所作为,我试图在使用Express v4.13.1的项目上运行nodemon
感谢您提供的任何帮助!
解决方案
我尝试了以下操作,没有工作:
npm uninstall nodemon
sudo npm uninstall -g nodemon
工作是什么:
sudo npm install -g --force nodemon
I'm on a Mac running El Capitan. I have node v5.6.0 and npm v3.6.0. When I try to run nodemon, I get:
-bash: nodemon: command not found
I thought this may mean that I didn't have nodemon installed, so when I tried to install it using...
sudo npm intall -g nodemon
...I get this:
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
If it makes a difference, I'm trying to run nodemon on a project that uses Express v4.13.1
Thanks for any help you can offer!
解决方案
I tried the following, and none worked:
npm uninstall nodemon
sudo npm uninstall -g nodemon
What did work was:
sudo npm install -g --force nodemon
这篇关于nodemon不工作:-bash:nodemon:命令未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文