我一直試圖安裝nodemon
使用npm install -g nodemon
,但我不斷收到以下錯誤。請幫忙NodeJS - NPM無法安裝nodemon軟件包
C:\Users\AllJs\Desktop\FF>npm install -g nodemon
npm ERR! tar.unpack untar error C:\Users\chris\AppData\Roaming\npm-cache\nodemon\1.9.1\package.tgz
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\AllJSAdmin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "nodemon"
npm ERR! node v4.2.3
npm ERR! npm v2.13.1
npm ERR! path C:\Program Files\nodejs\node_modules\nodemon
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall mkdir
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\nodemon'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\nodemon']
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'C:\\Program Files\\nodejs\\node_modules\\nodemon',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: 'C:\\Program Files\\nodejs\\node_modules\\nodemon',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ 'C:\\Users\\AllJSAdmin\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\fstream\\lib\\dir-writer.js:35:25',
npm ERR! 'C:\\Users\\AllJSAdmin\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\mkdirp\\index.js:47:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:82:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\AllJS\Desktop\FF\npm-debug.log
請提供'npm config get prefix'的輸出結果 –
嘗試以管理員身份運行您的CMD – 2016-04-21 08:05:52
@JasonWihardja這將導致未來出現更多問題,他應該正確解決此問題,而不是以管理員身份運行任何npm命令。 –