使用npm install -g generator-jhipster时出错

时间:2015-08-07 18:07:46

标签: node.js npm jhipster

我正在关注https://jhipster.github.io/installation.html的安装步骤。一切都很好,直到发电机 - jhipster。当我运行npm install -g generator-jhipster时,我收到以下错误,任何人都可以帮我解决这个问题吗?

C:\Users\smart>npm install -g generator-jhipster
/
> spawn-sync@1.0.13 postinstall C:\Users\smart\AppData\Roaming\npm\node_module
s\generator-jhipster\node_modules\yeoman-generator\node_modules\cross-spawn\node
_modules\spawn-sync
> node postinstall

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "generator-jhipster"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! path C:\Users\smart\AppData\Roaming\npm-cache\isarray\0.0.1\package\p
ackage.json
npm ERR! code EPERM
npm ERR! errno -4048

npm ERR! Error: EPERM, rename 'C:\Users\smart\AppData\Roaming\npm-cache\isarra
y\0.0.1\package\package.json'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM, rename 'C:\Users\smart\AppData\Roaming\npm-cache\is
array\0.0.1\package\package.json']
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   path: 'C:\\Users\\smart\\AppData\\Roaming\\npm-cache\\isarray\\0.0.
1\\package\\package.json',
npm ERR!   parent: 'readable-stream' }
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\smart\npm-debug.log

1 个答案:

答案 0 :(得分:2)

Please try running this command again as root/Administrator

你真的尝试过吗?