報(bào)錯(cuò):
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path D:\node.js\node_global
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir ‘D:\node.js\node_global’
npm ERR! [Error: EPERM: operation not permitted, mkdir ‘D:\node.js\node_global’] {undefined
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘mkdir’,
npm ERR! path: ‘D:\node.js\node_global’
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It’s possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
解決方法:
找到C盤(pán)下用戶目錄下的賬戶目錄下的.npmrc文件,如果找不到試著打開(kāi)隱藏的文件夾
刪除以后重新安裝成功