-1

While trying to create a new project with angular, I used the command ng new my-dream-app in command prompt and I receiver the following error message:

 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 fsevents@1.2.12: fsevents 1 will break on node v14+. Upgrade to fsevents 2 with massive improvements.
npm ERR! Unexpected end of JSON input while parsing near '...t-config-prettier":"^'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Izormen Onotieose\AppData\Roaming\npm-cache\_logs\2020-04-21T14_21_50_827Z-debug.log
× Package install failed, see above.

Pls how do I go about this?

DreadedHippy
  • 86
  • 1
  • 11
  • Can you show us your log file `C:\Users\Izormen Onotieose\AppData\Roaming\npm-cache\_logs\2020-04-21T14_21_50_827Z-debug.log` ? – smithnblack Apr 21 '20 at 15:02

2 Answers2

4

It looks like it is a cache error. Try this:

npm cache clean --force
npm install -g @angular/cli

Cheers!

smithnblack
  • 505
  • 7
  • 17
3

Try cleaning the cache and reinstalling global Angular CLI.

Open CMD as administrator and run

npm cache clean --force
npm install -g @angular/cli
ruth
  • 29,535
  • 4
  • 30
  • 57