2017-11-24 23 views
2

このコマンドを実行しようとすると、エラーとNPMが完全にインストールされません。 Node.jsの私もインストールノード-v8.9.1-x64.msiが、私は、私はアンインストール理由です直面してインストールしたノード-v6.11.0-x64のエラー:npm install -g @ angular/cli

をしかし、まだされた彼らの同じ問題は、このバージョンの前に

私はこの問題を解決することができません。

ノードバージョン:v6.11.0 NPMバージョン:3.10.0

エラーメッセージ:

D:\angular\NPM>npm install -g @angular/cli 
C:\Users\XXX\AppData\Roaming\npm 
`-- (empty) 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules\@a 
ngular\cli\node_modules\chokidar\node_modules\fsevents): 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected] 
1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"} 
) 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ 
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "@angular/cli" 
npm ERR! node v6.11.0 
npm ERR! npm v3.10.10 
npm ERR! path C:\Users\XXX\AppData\Roaming\npm\node_modules\.staging\rxjs-8d 
1ee8eb 
npm ERR! code EPERM 
npm ERR! errno -4048 
npm ERR! syscall rename 

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\XXX\AppData 
\Roaming\npm\node_modules\.staging\rxjs-8d1ee8eb' -> 'C:\Users\XXX\AppData\R 
oaming\npm\node_modules\@angular\cli\node_modules\rxjs' 
npm ERR!  at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\instal 
l\action\finalize.js:25:7) 
npm ERR!  at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-f 
s\polyfills.js:264:29 
npm ERR!  at FSReqWrap.oncomplete (fs.js:123:15) 
npm ERR! 
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\XXX\AppData 
\Roaming\npm\node_modules\.staging\rxjs-8d1ee8eb' -> 'C:\Users\XXX\AppData\R 
oaming\npm\node_modules\@angular\cli\node_modules\rxjs' 
npm ERR!  at Error (native) 
npm ERR! { Error: EPERM: operation not permitted, rename 'C:\Users\XXX\AppD 
ata\Roaming\npm\node_modules\.staging\rxjs-8d1ee8eb' -> 'C:\Users\XXX\AppDat 
a\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs' 
npm ERR!  at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\instal 
l\action\finalize.js:25:7) 
npm ERR!  at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-f 
s\polyfills.js:264:29 
npm ERR!  at FSReqWrap.oncomplete (fs.js:123:15) 
npm ERR! 
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\XXX\AppData 
\Roaming\npm\node_modules\.staging\rxjs-8d1ee8eb' -> 'C:\Users\XXX\AppData\R 
oaming\npm\node_modules\@angular\cli\node_modules\rxjs' 
npm ERR!  at Error (native) parent: '@angular/cli' } 
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!  D:\angular\NPM\npm-debug.log 
npm ERR! code 1 
+0

あなたはsudoで試してみましたか? – kriss

+0

私はsudoがlinuxコマンドだと思います...私はこれをWindow 7 OSにインストールしようとしています。 –

+0

管理者としてcmdを開こうとします – kriss

答えて

3

は、通常、私が言うように "sudoでそれを使う" と思い

sudo npm install -g @angular/cli 

しかし、あなたはWindows上にいるので、昇格したコマンドプロンプトを試してみてください。
つまり、コンソール(CMD)を管理者として起動し、コマンドをもう一度実行します。

問題が解決しない場合は、

npm cache clean 

タイプ

そしてもう一度

npm install -g @angular/cli 

を実行します。

+0

こんにちは、私はすでに管理者権限でコマンドプロンプトでこれらのすべてをやっています... –

+0

@VinitVikash私の編集を参照してください – NullDev

0

角度4+プロジェクトの開発のために、最新のノードのバージョンv8.8.9を使用する必要があります。そのため、モジュールに関連するエラーは発生しません。

関連する問題