Command:
npm install -g @angular/cli@latest
Exception:
verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...ge-2.2.1.tgz"},"engin' 169 verbose stack at JSON.parse () 169 verbose stack at parseJson (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\node_modules\json-parse-better-errors\index.js:7:17) 169 verbose stack at consumeBody.call.then.buffer (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\body.js:96:50) 169 verbose stack at 169 verbose stack at process._tickCallback (internal/process/next_tick.js:188:7)
Looking for help and support. Thanks
npm cache clean --force
Then :
npm install -g @angular/cli
If not working :
Delete package.lock.json file and try again
I started facing this issue after upgrading npm
package.
You can resolve this with: npm cache clean --force
voila, reinstall the package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With