NPM Install Error:Unexpected end of JSON input while parsing near '…nt-webpack-plugin“:”0'

前端 未结 30 2256
孤街浪徒
孤街浪徒 2020-11-22 10:20

When Creating a new Angular 5 project:

node version: 8.9.2

npm version: 5.5.1

My Command is

npm install -g @angular/cli
30条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 10:57

    I got error (file already exists --force to overwrite) after running the following code:

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

    I solved it using :

    npm i -g --force npm
    

    Make sure to run the first commands to flush the cache of npm.

提交回复
热议问题