1
186 verbose stack SyntaxError: Unexpected end of input at 1:21464
186 verbose stack ,"tarball":"https://registry.npmjs.org/autoprefixer/-/autoprefixer-0.
186 verbose stack ^
186 verbose stack at Object.parseJSON (C:\Users\admin\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\node_modules\json-parse-helpfulerror\node_modules\jju\lib\parse.js:745:13)
186 verbose stack at parse (C:\Users\admin\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\node_modules\json-parse-helpfulerror\index.js:10:13)
186 verbose stack at consumeBody.call.then.buffer (C:\Users\admin\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\body.js:96:50)
186 verbose stack at <anonymous>
186 verbose stack at process._tickCallback (internal/process/next_tick.js:169:7)
187 verbose cwd C:\Users\admin
188 verbose Windows_NT 10.0.10586
189 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "@angular/cli"
190 verbose node v8.0.0
191 verbose npm v5.0.0
192 error Unexpected end of input at 1:21464
192 error ,"tarball":"https://registry.npmjs.org/autoprefixer/-/autoprefixer-0.
192 error ^
193 verbose exit [ 1, true ]


Nvm is managing my node versions , it ran in my laptop some weeks before.


Update

After npm cache clean and installing cli again it gives me this error

12472 verbose enoent SKIPPING OPTIONAL DEPENDENCY:
12473 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@angular\cli\node_modules\colormin):
12474 warn enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open 'C:\Users\admin\AppData\Roaming\npm\node_modules\.staging\colormin-49f667bd\dist\lib\stripWhitespace.js'
12475 verbose enoent SKIPPING OPTIONAL DEPENDENCY: This is related to npm not being able to find a file.
12475 verbose enoent SKIPPING OPTIONAL DEPENDENCY:
12476 verbose stack Error: sha1-CWkdCXOjCtH4Ksc6EuIIfwpHVPk= integrity checksum failed when using sha1: wanted sha1-CWkdCXOjCtH4Ksc6EuIIfwpHVPk= but got sha1-SgdXJPMGxLuMFjYV7TnO68+L+3c=. (4997 bytes)
12476 verbose stack at Transform.on (C:\Users\admin\AppData\Roaming\nvm\v8.0.0\node_modules\npm\node_modules\ssri\index.js:275:19)
12476 verbose stack at emitNone (events.js:110:20)
12476 verbose stack at Transform.emit (events.js:207:7)
12476 verbose stack at endReadableNT (_stream_readable.js:1045:12)
12476 verbose stack at _combinedTickCallback (internal/process/next_tick.js:102:11)
12476 verbose stack at process._tickCallback (internal/process/next_tick.js:161:9)
12477 verbose cwd C:\Users\admin
12478 verbose Windows_NT 10.0.10586
12479 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "@angular/cli"
12480 verbose node v8.0.0
12481 verbose npm v5.0.0
12482 error code EINTEGRITY
12483 error sha1-CWkdCXOjCtH4Ksc6EuIIfwpHVPk= integrity checksum failed when using sha1: wanted sha1-CWkdCXOjCtH4Ksc6EuIIfwpHVPk= but got sha1-SgdXJPMGxLuMFjYV7TnO68+L+3c=. (4997 bytes)
12484 verbose exit [ 1, true ]

don't know why it is throwing errors like this, any help will be much appreciated , thanks.

asked Jun 23, 2017 at 4:07
3

2 Answers 2

7

I ran into the same issue - the latest version of npm uses self healing cache.
All you need to do is run:

npm cache verify

After that run:

npm i -g @angular/cli

That did the trick for me

answered Aug 13, 2017 at 7:48
Sign up to request clarification or add additional context in comments.

Comments

0

I was having a problem installing the Angular CLI with npm and found that I needed to disable auth in my .npmrc file.

answered Feb 26, 2018 at 19:13

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.