npm should be run outside of the node repl, in your normal shell


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM