2

i tried to create a new angular project but i am having this error just to know i have the latest version of angular and for node JS i am using the 12.16.2.


  • ng new project

the output :


/ Installing packages...npm WARN deprecated tslint@6.1.1: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated fsevents@1.2.12: fsevents 1 will break on node v14+. Upgrade to fsevents 2 with massive improvements. npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm ERR! Unexpected end of JSON input while parsing near '...er","version":"2.4.9"'

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\dell\AppData\Roaming\npm-cache_logs\2020-04-21T17_57_57_578Z-debug.log × Package install failed, see above. The Schematic workflow failed. See above.


enter image description here

2 Answers2

0

Sometimes cleaning the cache helps: Update Angular after clearing Cache

anand_v.singh
  • 2,768
  • 1
  • 16
  • 35
smithnblack
  • 505
  • 7
  • 17
0

It looks like it is a cache error. Reinstalling Angular CLI after clearing the npm cache. The below solution work for me, run below 3 commands one by one

  • npm install chokidar
  • npm cache clean --force
  • npm install -g @angular/cli@latest

Issue enter image description here

Resolution screen short: enter image description here

Abdullah
  • 2,393
  • 1
  • 16
  • 29