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

前端 未结 30 1852
孤街浪徒
孤街浪徒 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:47

    I solve that with

    First delete package-lock.json

    npm cache clean --force
    

    then update npm

    npm i npm@latest -g
    

    then use npm install command

    npm install 
    
    0 讨论(0)
  • 2020-11-22 10:48

    npm cache clean --force worked for me

    Error Resolved :

    $ npm install -g gulp npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm ERR! Unexpected end of JSON input while parsing near '.../RGs88STtAtiMP3tCiNdU'

    npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\admin\AppData\Roaming\npm-cache_logs\2018-11-20T07_38_56_733Z-debug.log

    0 讨论(0)
  • 2020-11-22 10:50

    this solved it npm cache clean --force

    0 讨论(0)
  • 2020-11-22 10:50

    I use Windows and removed all the files that were listed below and my problem was solved C:\Users{{your-username}}\AppData\Roaming\npm-cache

    0 讨论(0)
  • 2020-11-22 10:51

    It's error from your npm....

    So unistall node and install it again.

    It works....

    PS: After installing node again, install angular cli globally.

    npm install -g @angular/cli@latest
    
    0 讨论(0)
  • 2020-11-22 10:52

    I solve that with

    npm cache clean --force
    

    then update npm

    npm i npm@latest -g
    

    then normally use your npm install command

    npm install 
    
    0 讨论(0)
提交回复
热议问题