angular-cli: The Schematic workflow failed. See above.

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

šŸŒ Your Environment



<font color="#CC0000">     _                      _                 ____ _     ___</font>
<font color="#CC0000">    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|</font>
<font color="#CC0000">   / ā–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |</font>
<font color="#CC0000">  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |</font>
<font color="#CC0000"> /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|</font>
<font color="#CC0000">                |___/</font>
<font color="#CC0000">    </font>

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.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 4
  • Comments: 30 (4 by maintainers)

Most upvoted comments

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

has fixed the issue for me.

First try the following

npm cache clean --force
npm install -g @angular/cli
ng new <project-name>

If the problem persists, then try this (this eventually solved my workflow issue)

npm cache clean --force
npm update
ng new <project-name>

Thanks!

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!

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


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

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

@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.

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

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.