angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

The Schematic workflow failed. See above.

Open csrahulram opened this issue 6 years ago โ€ข 29 comments

๐Ÿž Bug report

Command (mark with an x)

  • [x ] new
  • [ ] build
  • [ ] serve
  • [ ] test
  • [ ] e2e
  • [ ] generate
  • [ ] add
  • [ ] update
  • [ ] lint
  • [ ] xi18n
  • [ ] run
  • [ ] config
  • [ ] help
  • [ ] version
  • [ ] doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 8.3.25

Description

I have ubuntu system and the configuration as follows OS Version : Ubuntu 18.04.4 LTS Memory : 7.5 GiB Processor : Intelยฎ Coreโ„ข i5-6200U CPU @ 2.30GHz ร— 4 Graphics : Intelยฎ HD Graphics 520 (Skylake GT2) GNOME : 3.28.2 OS Type : 64-bit Disk : 983.4 GB

๐Ÿ”ฌ Minimal Reproduction

Its a fresh system

  1. Install NodeJS from ubuntu app store
  2. Select the stable version of node - v12.16.1 - stable
  3. Install 'npm i -g @angular/cli@latest'
  4. Run 'ng new my-app'
  5. The code creates the folder and stops after few mins with below error. Tried several times the issue persist.

๐Ÿ”ฅ Exception or Error


sudo ng new my-app
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? SCSS   [ https://sass-lang.com/
documentation/syntax#scss                ]
CREATE formbuilder-web/README.md (1031 bytes)
CREATE formbuilder-web/.editorconfig (246 bytes)
CREATE formbuilder-web/.gitignore (631 bytes)
CREATE formbuilder-web/angular.json (3727 bytes)
CREATE formbuilder-web/package.json (1292 bytes)
CREATE formbuilder-web/tsconfig.json (489 bytes)
CREATE formbuilder-web/tslint.json (1953 bytes)
CREATE formbuilder-web/browserslist (429 bytes)
CREATE formbuilder-web/karma.conf.js (1027 bytes)
CREATE formbuilder-web/tsconfig.app.json (210 bytes)
CREATE formbuilder-web/tsconfig.spec.json (270 bytes)
CREATE formbuilder-web/src/favicon.ico (948 bytes)
CREATE formbuilder-web/src/index.html (300 bytes)
CREATE formbuilder-web/src/main.ts (372 bytes)
CREATE formbuilder-web/src/polyfills.ts (2835 bytes)
CREATE formbuilder-web/src/styles.scss (80 bytes)
CREATE formbuilder-web/src/test.ts (753 bytes)
CREATE formbuilder-web/src/assets/.gitkeep (0 bytes)
CREATE formbuilder-web/src/environments/environment.prod.ts (51 bytes)
CREATE formbuilder-web/src/environments/environment.ts (662 bytes)
CREATE formbuilder-web/src/app/app-routing.module.ts (246 bytes)
CREATE formbuilder-web/src/app/app.module.ts (393 bytes)
CREATE formbuilder-web/src/app/app.component.scss (0 bytes)
CREATE formbuilder-web/src/app/app.component.html (25755 bytes)
CREATE formbuilder-web/src/app/app.component.spec.ts (1086 bytes)
CREATE formbuilder-web/src/app/app.component.ts (220 bytes)
CREATE formbuilder-web/e2e/protractor.conf.js (808 bytes)
CREATE formbuilder-web/e2e/tsconfig.json (214 bytes)
CREATE formbuilder-web/e2e/src/app.e2e-spec.ts (648 bytes)
CREATE formbuilder-web/e2e/src/app.po.ts (301 bytes)
โœ– Package install failed, see above.
The Schematic workflow failed. See above.

๐ŸŒ Your Environment



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / โ–ณ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 9.0.5
Node: 12.16.1
OS: linux x64

Angular: 
... 
Ivy Workspace: 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.900.5
@angular-devkit/core         9.0.5
@angular-devkit/schematics   9.0.5
@schematics/angular          9.0.5
@schematics/update           0.900.5
rxjs                         6.5.3
    

Anything else relevant?

Using default Terminal.

csrahulram avatar Mar 12 '20 06:03 csrahulram

I don't think this is angular-cli specific. It is being caused by the sass package. I'm running ng n test on windows which gives a verbose error:

2701 http fetch GET 304 https://registry.npmjs.org/sass 55ms (from cache) 2702 silly fetchPackageMetaData error for [email protected] Unexpected end of JSON input while parsing near '...\ncwmoW47aRoIrxuhYgKu'

I get the same error trying to install sass in an empty node project. It looks like npm has a problem with the json returned from https://registry.npmjs.org/sass. I was on npm v 6.13.4 and updated to 6.14.2 to see if it fixed the issue but that didn't help.

ncwmoW47aRoIrxuhYgKu is part of the dist.npm-signature in the json returned from https://registry.npmjs.org/sass.

JayChase avatar Mar 12 '20 08:03 JayChase

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

has fixed the issue for me.

JayChase avatar Mar 12 '20 09:03 JayChase

Hey JayChase,

I have tried your solution but didn't helped me. I found the OS is blocking the Schematic workflow due to some permission level for my user account. Will try to reset the OS and try again as root user.

Thanks for your reply.

csrahulram avatar Mar 12 '20 09:03 csrahulram

This issue is with the Hard Ware of my PC. Not Angular CLI issue. Thanks for the help.

csrahulram avatar Mar 13 '20 05:03 csrahulram

hello guys, please am having same issue -- not able to install angular/cli

Ewaoche avatar Mar 13 '20 15:03 Ewaoche

If the package installation failed (which is done by executing the system's node package manager: npm, yarn, etc.), then you can try to run ng new my-app --skip-install to generate the application without that step. From there you can attempt to manually run the package manager (npm install/yarn/etc.) from within the new project. For assistance with any failures at that point, please direct inquiries to the package manager's project. npm: https://github.com/npm/cli/issues yarn: https://github.com/yarnpkg/yarn/issues

clydin avatar Mar 13 '20 17:03 clydin

I'm a newbie. I'm trying to create my first angular app and I got this problem too. the error in log file: "error Unexpected end of JSON input while parsing near '...f1rUtt/W63ltUP8dva/XP'" latest node version, latest npm version, latest angular cli version, when "ng new myapp", I choose options: add router, cscc. I try to "npm cache clear --force", reinstall angular cli, etc, but it doesn't work. Still got the error message: "The Schematic workflow failed. See above." "npm ERR! Unexpected end of JSON input while parsing near '...f1rUtt/W63ltUP8dva/XP'" Does somebody have solution ?

doanchungtu95 avatar Mar 24 '20 10:03 doanchungtu95

I also have same issue. Any fix?

vijaynt avatar Apr 01 '20 12:04 vijaynt

CREATE bhar/e2e/src/app.po.ts (301 bytes) | Installing packages...warning @angular-devkit/build-angular > less > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 warning @angular-devkit/build-angular > stylus > css-parse > css > [email protected]: Please see https://github.com/lydell/urix#deprecated warning @angular-devkit/build-angular > stylus > css-parse > css > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated warning @angular-devkit/build-angular > stylus > css-parse > css > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated warning @angular/cli > universal-analytics > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 warning protractor > webdriver-manager > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 error An unexpected error occurred: "https://registry.yarnpkg.com/@angular/core/-/core-9.1.0.tgz: unexpected end of file". ร— Package install failed, see above. The Schematic workflow failed. See above.

i got an error like this

bhargava-9963 avatar Apr 04 '20 09:04 bhargava-9963

@csrahulram same issue here using Ubuntu SNAP distribution of node/npm (tested using channels for versions 12 and 13). Switched to debian standard apt node/npm 12 LTS distribution (via apt - https://github.com/nodesource/distributions/blob/master/README.md#debinstall) and the error has gone.

michelrisucci avatar Apr 08 '20 12:04 michelrisucci

have the same issue.....any help??? I've tried all the previous solutions. i can't create a new app. I'm using Ubuntu 18.04 and node 12.16.1 and angular 9.1.1 and npm 6.14.4

ghost avatar Apr 09 '20 04:04 ghost

I'm a newbie. I'm trying to create my first angular app and I got this problem too. the error in log file: "error Unexpected end of JSON input while parsing near '...f1rUtt/W63ltUP8dva/XP'" latest node version, latest npm version, latest angular cli version, when "ng new myapp", I choose options: add router, cscc. I try to "npm cache clear --force", reinstall angular cli, etc, but it doesn't work. Still got the error message: "The Schematic workflow failed. See above." "npm ERR! Unexpected end of JSON input while parsing near '...f1rUtt/W63ltUP8dva/XP'" Does somebody have solution ?

after clean uninstall node, npm, angular rm -rf /usr/local/bin/npm /usr/local/lib/dtrace/node.d; rm -rf ~/.npm; rm -rf /usr/local/bin/node; rm -rf /usr/local/lib/node_modules/npm/; and install all again by homebrew (not use node installer), I don't get above error anymore brew install node; export NODE_PATH='/usr/local/lib/node_modules' brew install angular-cli but after that I get new error "error Response timeout while trying to fetch" Maybe I have some network error...but I can access the link by browser. I don't know why, but try again with some differences I remove project and create again but skip install like these

  1. ng new angular --skip-install
  2. cd angular
  3. npm i everything's fine. And try ng serve The angular app start successfully!

Hope these things can help :D

doanchungtu95 avatar Apr 09 '20 09:04 doanchungtu95

Have same issue Its working try it

ng new angular --skip-install cd angular npm i everything's fine. And try ng serve The angular app start successfully!

devajitgupta avatar Apr 10 '20 10:04 devajitgupta

**ng new angular --skip-install cd angular npm i everything's fine. And try ng serve The angular app start successfully! Thanx to everyone


devajitgupta avatar Apr 10 '20 10:04 devajitgupta

same issue "The Schematic workflow failed."

cynthianorman avatar Apr 10 '20 20:04 cynthianorman

I also encountered this issue. Although I initially tried with routing yes and SCSS for styles, this occurs even when choosing no for the routing prompt and CSS for styles.

Working solution

This solution involved installing and using yarn as Angular's package manager as described in a potentially related Stack Overflow post. This implies that the problem is, indeed, related to npm. Steps:

  1. Globally install yarn classic 1.22.4.
  2. Open %userprofile%\.angular-config (or equivalent file, if not on Windows).
  3. Add "packageManager": "yarn" to the "cli" object.

Resulting .angular-config file contents:

{
  "version": 1,
  "cli": {
    "analytics": false,
    "packageManager": "yarn"
  }
}

Failed solutions

  • npm cache clean --force
  • ng new my-app --skip-install followed by npm i
  • changing the codelyzer dependency from ^5.1.2 to 5.2.1 as suggested here.

Versions

I use nvm 1.1.7 to manage npm installations.

  • node -v: v12.16.1
  • npm -v: 6.13.4
  • OS: Windows 10 64-bit

ng --version:

Angular CLI: 9.1.1
Node: 12.16.1
OS: win32 x64

Angular:
...
Ivy Workspace:

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.901.1
@angular-devkit/core         9.1.1
@angular-devkit/schematics   9.1.1
@schematics/angular          9.1.1
@schematics/update           0.901.1
rxjs                         6.5.4

OhiraKyou avatar Apr 13 '20 15:04 OhiraKyou

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

has fixed the issue for me.

worked for me! Tahnks

LordKenzo avatar Apr 18 '20 17:04 LordKenzo

I use, the last versions components Angular, i had the similarity problem, i solve with increment space HD disk, "21370 error nospc ENOSPC: no space left on device, mkdir 'C:\Proyectos\angular\angular-crud\node_modules.staging\toidentifier-ff0bcd7f'" thanks everyone

griosb avatar Apr 19 '20 21:04 griosb

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

has fixed the issue for me.

Thank you this is helpful :)

amiruln avatar Apr 21 '20 11:04 amiruln

devajitgupta

I'm a newbie. I'm trying to create my first angular app and I got this problem too. the error in log file: "error Unexpected end of JSON input while parsing near '...f1rUtt/W63ltUP8dva/XP'" latest node version, latest npm version, latest angular cli version, when "ng new myapp", I choose options: add router, cscc. I try to "npm cache clear --force", reinstall angular cli, etc, but it doesn't work. Still got the error message: "The Schematic workflow failed. See above." "npm ERR! Unexpected end of JSON input while parsing near '...f1rUtt/W63ltUP8dva/XP'" Does somebody have solution ?

after clean uninstall node, npm, angular rm -rf /usr/local/bin/npm /usr/local/lib/dtrace/node.d; rm -rf ~/.npm; rm -rf /usr/local/bin/node; rm -rf /usr/local/lib/node_modules/npm/; and install all again by homebrew (not use node installer), I don't get above error anymore brew install node; export NODE_PATH='/usr/local/lib/node_modules' brew install angular-cli but after that I get new error "error Response timeout while trying to fetch" Maybe I have some network error...but I can access the link by browser. I don't know why, but try again with some differences I remove project and create again but skip install like these

  1. ng new angular --skip-install
  2. cd angular
  3. npm i everything's fine. And try ng serve The angular app start successfully!

Hope these things can help :D

Does it resolve total or do i have to still go through the procedure to create new Angular App

Flave1 avatar Apr 22 '20 02:04 Flave1