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

前端 未结 30 2260
孤街浪徒
孤街浪徒 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 11:13

    This command alone solved my problem:

    npm cache clean --force
    

    Also you should make sure you are using the correct version of node.

    Using nvm to manage the node version:

    nvm list; # check your local versions;
    nvm install 10.10.0; # install a new remote version;
    nvm alias default 10.10.0; # set the 10.10.0 as the default node version, but you have to restart the terminal to make it take effect;
    

提交回复
热议问题