0

When ever i wrote command ng new ____ this end up with following error.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Hanan\AppData\Roaming\npm-cache\_logs\2019-04-25T19_43_24_837Z-debug.log
Package install failed

my installed version are

Nods js 12.0
NPM     6.9
angular CLi 7.3.8
Igor
  • 60,821
  • 10
  • 100
  • 175
Hanan Afzal
  • 21
  • 1
  • 4
  • 1
    I didn't write the book on debugging but my first instinct would be to read that log file. Maybe it exists to help you figure out what went wrong and fix it. Just a hunch... If you still are stuck then please include the relevant details of that log file in your question. – Igor Apr 25 '19 at 20:17
  • Are other Angular commands working, e.g ‘ng generate component’? It looks like ‘ng’ isn’t being recognised by your terminal, rather than a problem with Angular itself. If so, this might be of help? https://stackoverflow.com/questions/37991556/ng-is-not-recognized-as-an-internal-or-external-command – Matt Saunders Apr 25 '19 at 20:41
  • Also I don’t use a PC so this may not be relevant, but is the Angular CLI installed globally? If not this would also be worth trying. – Matt Saunders Apr 25 '19 at 20:42
  • can you try and run ng new with --skip-npm and later do an npm install inside the new project to see if that works? – Taha Zgued Apr 25 '19 at 23:08
  • I found solution..There was a problem with the Angular CLI so now I have installed Yarn Package Manager,which is much faster than ng and this download all the required node modules – Hanan Afzal Apr 29 '19 at 08:20

0 Answers0