npm ERR! Unexpected token } in JSON at position 438325

Error :

npm ERR! Unexpected token } in JSON at position 438325

when trying to run "npm install" command in angular CLI getting the below error:

npm ERR! Unexpected token } in JSON at position 438325

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Subba\AppData\Roaming\npm-cache\_logs\2019-04-23T13_44_36_571Z-debug.log


To resolve this error below are the solutions

Solutions: 

  1. execute the command "npm cache verify" - which will clear the cache of package.json then re run the "npm install" it will work.
  2. If still not working go to manually located angular root folder and delete the "package.json.lock" then re run the "npm install" command.
  3. still if you are facing the issue it may be due to proxy settings because when delete the "package.json.lock" it will delete the existing saved proxy settings so re run the proxy setup commands.
    npm config set proxy <<PROXY_NAME>>
  4. suppose dont want to set proxy the run the below command:

    npm config set strict-ssl false

Yeah.. thats it. it will resolve the error and works fine..🙋🙋🙋

Comments

Popular posts from this blog

Angular 2 Vs Angular4

Angular setup