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
Sachin
2,7831 gold badge21 silver badges36 bronze badges
-
are you using standard npm repository or it is a private npm repository ?Parham Alvani– Parham Alvani2017年06月23日 04:29:39 +00:00Commented Jun 23, 2017 at 4:29
-
it should the standard one, i done nothing on that.Sachin– Sachin2017年06月23日 04:30:47 +00:00Commented Jun 23, 2017 at 4:30
-
Possible duplicate of Integrity checksum failure while installing API Connect toolkit #apiconnectkenorb– kenorb2019年02月18日 12:10:13 +00:00Commented Feb 18, 2019 at 12:10
2 Answers 2
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
Sign up to request clarification or add additional context in comments.
Comments
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
HisDivineShadow
1,2002 gold badges13 silver badges24 bronze badges
Comments
lang-js