错误信息如下:
179 silly pacote range manifest for autoprefixer@^6.5.3 fetched in 3075ms
180 silly resolveWithNewModule autoprefixer@6.7.7 checking installable status
181 http fetch GET 304 https://registry.npmjs.org/@schematics%2fangular 13568ms (from cache)
182 silly pacote range manifest for @schematics/angular@~0.0.30 fetched in 13571ms
183 silly resolveWithNewModule @schematics/angular@0.0.36 checking installable status
184 verbose stack SyntaxError: Unexpected end of input at 1:68552
184 verbose stack v-server.js"},"directories":{},"dist":{"shasum":"cbb6a0d3e7c8eb5453b3
184 verbose stack ^
184 verbose stack at Object.parseJSON (/usr/lib/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)
184 verbose stack at parse (/usr/lib/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)
184 verbose stack at consumeBody.call.then.buffer (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js:96:50)
184 verbose stack at <anonymous>
184 verbose stack at process._tickCallback (internal/process/next_tick.js:188:7)
185 verbose cwd /
186 verbose Linux 3.10.0-514.el7.x86_64
187 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "@angular/cli"
188 verbose node v8.6.0
189 verbose npm v5.3.0
190 error Unexpected end of input at 1:68552
190 error v-server.js"},"directories":{},"dist":{"shasum":"cbb6a0d3e7c8eb5453b3
190 error ^
191 verbose exit [ 1, true ]
解决方法:npm cache clean --force
再次执行:npm install -g @angular/cli