新建項目
admin為項目名稱
ng new admin --routing --style=sass
報錯信息
npm WARN deprecated istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump
npm ERR! Unexpected end of JSON input while parsing near '...DHDJTFiu5VJ4/XoyPZ3HW'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-08-31T02_09_46_334Z-debug.log
Package install failed, see above.
解決辦法
使用ng new admin創建項目時報錯
npm WARN deprecated istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: load-json-file@^1.0.0 (node_modules\read-pkg\node_modules\load-json-file):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Unexpected end of JSON input while parsing near '...:{"node":">=4"}},"4.0'
npm ERR! Unexpected end of JSON input while parsing near '...","jshint":"^2.6.0","'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-08-31T02_47_12_430Z-debug.log
Package install failed, see above.