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.25Description
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
- Install NodeJS from ubuntu app store
- Select the stable version of node - v12.16.1 - stable
- Install 'npm i -g @angular/cli@latest'
- Run 'ng new my-app'
- 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 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.
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!
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
Thanks
Eventually it works. npm cache clean --force npm i -g @angular/cli
npm cache clean --forcenpm i -g @angular/clicorrigiu o problema para mim.
Obrigado. Essa funcionou perfeitamente pra mim.
npm cache clean --forcenpm i -g @angular/clihas fixed the issue for me.
This worked for me. But does anyone know WHY this works?
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.
npm cache clean --forcenpm i -g @angular/clihas fixed the issue for me.
Worked in WIndows OS
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.