npm 安装yeoman时出现npm WARN deprecated [email protected]报错...解决办法

npm 安装yeoman时出现npm WARN deprecated [email protected]报错…解决办法

我是nodeJS 小白,在用npm命令安装yeoman是,给出了这样的错误提示:

$ npm install -g yo grunt-cli bower
npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
C:\Users\weijiqiang\AppData\Roaming\npm\grunt -> C:\Users\weijiqiang\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt
C:\Users\weijiqiang\AppData\Roaming\npm\bower -> C:\Users\weijiqiang\AppData\Roaming\npm\node_modules\bower\bin\bower
npm ERR! Windows_NT 6.1.7601
npm ERR! argv “D:\nodejs\node.exe” “D:\nodejs\node_modules\npm\bin\npm-cli.js” “install” “-g” “yo” “grunt-cli” “bower”
npm ERR! node v4.3.1
npm ERR! npm v2.14.12
npm ERR! path C:\Users\weijiqiang\AppData\Roaming\npm-cache\number-is-nan\1.0.0\package\package.json.4e78fe01c7b0108809d47faafec0db88
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename ‘C:\Users\weijiqiang\AppData\Roaming\npm-cache\number-is-nan\1.0.0\package\package.json.4e78fe01c7b0108809d47faafec0db88’ -> ‘C:\Users\weijiqiang\AppData\Roaming\npm-cache\number-is-nan\1.0.0\package\package.json’
npm ERR! at Error (native)
npm ERR! { [Error: EPERM: operation not permitted, rename ‘C:\Users\weijiqiang\AppData\Roaming\npm-cache\number-is-nan\1.0.0\package\package.json.4e78fe01c7b0108809d47faafec0db88’ -> ‘C:\Users\weijiqiang\AppData\Roaming\npm-cache\number-is-nan\1.0.0\package\package.json’]
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘rename’,
npm ERR! path: ‘C:\Users\weijiqiang\AppData\Roaming\npm-cache\number-is-nan\1.0.0\package\package.json.4e78fe01c7b0108809d47faafec0db88’,
npm ERR! dest: ‘C:\Users\weijiqiang\AppData\Roaming\npm-cache\number-is-nan\1.0.0\package\package.json’,
npm ERR! parent: ‘code-point-at’ }
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\weijiqiang\npm-debug.log

安装其他package是没问题的;
google 了一下好像说是npm本身因素导致的,解决办法是在执行安装yeoman命令之前先执行

npm i -g yeoman-doctor

命令,就不报错了,如图:
npm 安装yeoman时出现npm WARN deprecated npmconf@2.1.2报错...解决办法_第1张图片

如果没能解决你的问题可以参考:https://github.com/yeoman/yo/issues/403
或者到npm社区寻求解决办法;

你可能感兴趣的:(nodeJS)