Node版本:v0.12.4
在安装 npm install -g -supervisor是出现:
npm ERR! addLocal Could not install D:\Program Files\nodejs
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "D:\\Program Files\\nodejs\\\\node.exe" "D:\\Program Files\\
\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "-supervisor"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR! EISDIR, read
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! D:\Program Files\nodejs\npm-debug.log
也就是说,想要运行node命令,需要在系统的shell中,比如windows的cmd。node自带的那个叫repl,不能在其中运行npm命令,只能运行js语句
需要在其它的CMD文件命令行下运行
npm install -g supervisor即可;
参考网址:
http://stackoverflow.com/questions/24476805/how-to-resolve-npm-should-be-run-outside-of-the-node-repl-in-your-normal-shell