1

I'm trying to install angular 6 with:
$ npm install -g @angular/cli@latest

Using
node -v - v8.11.1
npm -v - 6.0.1
OS - Linux (Mint 18)

Getting this error:

npm ERR! Unexpected end of JSON input while parsing near '...um":"7e1bd7294bd522da'

Note: Have already tried npm cache verify and npm cache clean --force

1 Answer 1

1

This seems like a problem with your node/npm and not with Angular CLI.

Just completely uninstall the Node.js from Programs and Features and Re-install it,Make sure that you completely deleted all the node-modules and npm caches in the Npm folder and not present anywhere else

Sign up to request clarification or add additional context in comments.

5 Comments

Tried uninstalling node and installing it again still getting the same result, Also tried nvm and tried the same with 8.11.2 and 9.2.0 but getting the same result, is it because of some remaining file (even if I'm using nvm to specify the version of node to be used)?
can you try eleting the package-lock.json and after this run npm install.
I'm using nvm now with node 8.11.2 and npm 5.5.1, after deleting the package-lock.json.5 from the version/v8.11.2/lib/node_modules/npm/ I'm getting the same result
that is very strange, somewhere your files still exists
Removing nodejs completely and installing it again worked thank you!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.