JavaEar 专注于收集分享传播有价值的技术资料

Angular 9 ng new myapp gives error The Schematic workflow failed

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 request@2.88.2: 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?

6个回答

    最佳答案
  1. I got it working, first I installed angular 8 then ran npm install -g @angular/cli@latest. It updated to angular 9 and now i'm able to create new projects. Thank you all for your consideration

  2. 参考答案2
  3. as a temporary fix you can manually install "error-ex" module directly from GitHub then install your dependencies as mentioned here facebook/create-react-app#8465 (comment)

    $ npm i https://github.com/Qix-/node-error-ex

    $ npm i

  4. 参考答案3
  5. This issue is reported for angular 9 and multiple geo-locations are facing this problem. refer https://github.com/angular/angular-cli/issues/16944

    to proceed you can bring you angular version to 8 with below steps

    ng --version

    npm uninstall -g @angular/cli

    npm cache clean --force

    npm install -g @angular/cli@8.0.0

    ng --version

  6. 参考答案4
  7. I had this issue since yesterday, tried all of this and it did not work. Then I installed yarn, and configured angular cli to use yarn as the packagemanager by running this command ng config -g cli.packageManager yarn, and it worked.

  8. 参考答案5
  9. I had this issue then I navigate to the file .angular-config path C:\Users\username and change "packageManager" : "npm"

    { "version": 1, "cli": { "analytics": "_________", "packageManager": "npm" } }

  10. 参考答案6
  11. I had the same problem, after a lot of search and two day of trying many ways, I finally solved my problem by installing codelyzer. first run this command in cmd:

    npm install -g codelyzer
    

    then run:

    ng new yourProject