Angular 9 ng new myapp gives error The Schematic workflow failed

Lijo Daniel picture Lijo Daniel · Feb 12, 2020 · Viewed 23.3k times · Source

I have angular 9 installed

Angular CLI: 9.0.1 Node: 13.8.0 OS: win32 x64

Angular: ... Ivy Workspace:

Package Version

@angular-devkit/architect 0.900.1
@angular-devkit/core 9.0.1
@angular-devkit/schematics 9.0.1
@schematics/angular 9.0.1
@schematics/update 0.900.1
rxjs 6.5.3

Everytime i try to create a new project with ng new, I'm getting the message

Installing packages...npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm ERR! Unexpected end of JSON input while parsing near '...pm-signature":"-----B' npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Lijo John Daniel\AppData\Roaming\npm-cache_logs\2020-02-12T09_52_57_342Z-debug.log × Package install failed, see above. The Schematic workflow failed. See above.

I have tried re-installing angular and even node but issue still remains

My OS version is Win 10 v.1909 build 18363.592. Can someone help me with this?

Answer

Mahrez BenHamad picture Mahrez BenHamad · Apr 24, 2020

Try to clean the npm cache using:

npm cache clean --force

then should it works now,

ng new my-app