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.
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.
npm cache clean --force
npm i -g @angular/cli
has fixed the issue for me.
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.
This issue is with the Hard Ware of my PC. Not Angular CLI issue. Thanks for the help.
hello guys, please am having same issue -- not able to install angular/cli
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
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 ?
I also have same issue. Any fix?
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
@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.
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
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
- ng new angular --skip-install
- cd angular
- npm i everything's fine. And try ng serve The angular app start successfully!
Hope these things can help :D
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
same issue "The Schematic workflow failed."
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:
- Globally install yarn classic 1.22.4.
- Open
%userprofile%\.angular-config(or equivalent file, if not on Windows). - Add
"packageManager": "yarn"to the"cli"object.
Resulting .angular-config file contents:
{
"version": 1,
"cli": {
"analytics": false,
"packageManager": "yarn"
}
}
Failed solutions
npm cache clean --forceng new my-app --skip-installfollowed bynpm i- changing the codelyzer dependency from
^5.1.2to5.2.1as suggested here.
Versions
I use nvm 1.1.7 to manage npm installations.
node -v: v12.16.1npm -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
npm cache clean --forcenpm i -g @angular/clihas fixed the issue for me.
worked for me! Tahnks
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
npm cache clean --forcenpm i -g @angular/clihas fixed the issue for me.
Thank you this is helpful :)
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
- ng new angular --skip-install
- cd angular
- 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