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

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

I also got this issue and solved by your way. Probably because of the snap permissions issue.

michaellee8 avatar Apr 23 '20 10:04 michaellee8

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!

Akhi1 avatar May 04 '20 16:05 Akhi1

npm cache clean --force npm uninstall -g @angular/cli remove the files from %temp% and temp and prefetch and restart the system and then install the npm install -g @angular/cli ng new it worked from me............

Thanks

bhaskarreddy463 avatar May 09 '20 13:05 bhaskarreddy463

Eventually it works. npm cache clean --force npm i -g @angular/cli

RamCse39 avatar May 21 '20 17:05 RamCse39

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

corrigiu o problema para mim.

Obrigado. Essa funcionou perfeitamente pra mim.

rodolfocoding avatar May 24 '20 15:05 rodolfocoding

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

has fixed the issue for me.

This worked for me. But does anyone know WHY this works?

DivanVanZyl avatar May 29 '20 19:05 DivanVanZyl

When you see npm errors similar to the following (copied from above),

Unexpected end of JSON input while parsing near '...\ncwmoW47aRoIrxuhYgKu'

it generally means npm either downloaded something incorrectly or npm's cache was somehow corrupted. By forcing the cache to be cleaned, you are emptying the cache so that a new download will occur next time the package is installed. These errors are not Angular CLI specific and are rather related to the npm command line utility.

clydin avatar May 29 '20 19:05 clydin

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

has fixed the issue for me.

Worked in WIndows OS

irfanit93 avatar Jul 02 '20 15:07 irfanit93

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.