NPM インストール エラー: '...nt-webpack-plugin':"0' 付近の解析中に JSON 入力が予期せず終了しました 質問する

NPM インストール エラー: '...nt-webpack-plugin':

新しい Angular 5 プロジェクトを作成する場合:

ノードバージョン: 8.9.2

バージョン: 5.5.1

私のコマンドは次のとおりです:

npm install -g @angular/cli

エラーは次のとおりです:

npm ERR! **Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'**
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Aashitec\AppData\Roaming\npm-cache\_logs\2017-12-06T13_10_10_729Z-debug.log

エラーログはここにあります

ベストアンサー1

これで問題は解決しました:

Windows Powershellを管理者として開く

npm cache clean --force
npm install -g @angular/cli

https://devblogs.microsoft.com/premier-developer/getting-started-with-node-js-angular-and-visual-studio-code/

おすすめ記事