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

[9.0.0-rc.7] Package install failed

Open olilutz opened this issue 6 years ago • 11 comments

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

Works in lastest v8 (ubuntu/windows) and in v9 rc in windows

Description

I installed @angular/cli@next in Ubuntu 19.10 and with every ng command that does package installation it fails with: 'Package install failed, see above. The Schematic workflow failed. See above.'

🔬 Minimal Reproduction

Install nodejs 12 from snap Install sudo npm i -g @angular/cli@next also required --scripts-prepend-node-path despite I set this true globally before. Make a new angular project with ng new. Or ng g app or lib or ng add package or ng update package. It always fails on package installation.

🔥 Exception or Error


ng g app new-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 projects/new-app/browserslist (429 bytes)
CREATE projects/new-app/karma.conf.js (1023 bytes)
CREATE projects/new-app/tsconfig.app.json (218 bytes)
CREATE projects/new-app/tsconfig.spec.json (278 bytes)
CREATE projects/new-app/tslint.json (247 bytes)
CREATE projects/new-app/src/favicon.ico (948 bytes)
CREATE projects/new-app/src/index.html (292 bytes)
CREATE projects/new-app/src/main.ts (372 bytes)
CREATE projects/new-app/src/polyfills.ts (2838 bytes)
CREATE projects/new-app/src/styles.scss (80 bytes)
CREATE projects/new-app/src/test.ts (642 bytes)
CREATE projects/new-app/src/assets/.gitkeep (0 bytes)
CREATE projects/new-app/src/environments/environment.prod.ts (51 bytes)
CREATE projects/new-app/src/environments/environment.ts (662 bytes)
CREATE projects/new-app/src/app/app-routing.module.ts (246 bytes)
CREATE projects/new-app/src/app/app.module.ts (393 bytes)
CREATE projects/new-app/src/app/app.component.scss (0 bytes)
CREATE projects/new-app/src/app/app.component.html (25705 bytes)
CREATE projects/new-app/src/app/app.component.spec.ts (1062 bytes)
CREATE projects/new-app/src/app/app.component.ts (212 bytes)
CREATE projects/new-app/e2e/protractor.conf.js (808 bytes)
CREATE projects/new-app/e2e/tsconfig.json (226 bytes)
CREATE projects/new-app/e2e/src/app.e2e-spec.ts (640 bytes)
CREATE projects/new-app/e2e/src/app.po.ts (262 bytes)
UPDATE angular.json (7532 bytes)
✖ Package install failed, see above.
The Schematic workflow failed. See above.


🌍 Your Environment

Ubuntu 19.10 wayland session


Angular CLI: 9.0.0-rc.7
Node: 12.14.0
OS: linux x64

Angular: 9.0.0-rc.7
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-rc.7
@angular-devkit/build-angular     0.900.0-rc.7
@angular-devkit/build-optimizer   0.900.0-rc.7
@angular-devkit/build-webpack     0.900.0-rc.7
@angular-devkit/core              9.0.0-rc.7
@angular-devkit/schematics        9.0.0-rc.7
@ngtools/webpack                  9.0.0-rc.7
@schematics/angular               9.0.0-rc.7
@schematics/update                0.900.0-rc.7
rxjs                              6.5.3
typescript                        3.6.4
webpack                           4.41.2

Anything else relevant? I think the problem occurs only with nodejs as snap. The cli install was the only one that needed --scripts-prepend-node-path explicitly set as option, other packages worked out of the box.

olilutz avatar Dec 22 '19 20:12 olilutz

I also face this issue is there a workaround?

KristijanZic avatar Mar 02 '20 02:03 KristijanZic

I ran into the same issue, but found out I had the cli(v8.0.0) installed locally.

For Windows If you have it installed locally, here are the steps I used to solve the generated error.

  1. Run npm uninstall -g @angular/cli and npm uninstall @angular/cli.
  2. Run npm cache verify
  3. Reopen the editor and reinstall the angular cli using npm install -g @angular/cli.

It should work for windows (I haven't tried it for Linux, but I think it's still the same workaround). The npm cache verify command took too long to finish for me while I had the cli version 8.0.0 installed in my local directory, but was quick when I uninstalled it on my locally.

Also, make sure you verify the cache for garbage collection of unneeded data, verification of contents in cache folder, and verifying the integrity of the cache index, and all cached data.

Helpful Links https://github.com/angular/angular-cli/issues/11366 https://docs.npmjs.com/cli-commands/cache.html

sunkanmii avatar Mar 09 '20 22:03 sunkanmii

I have tried this but same issue occurs any one who knows some different ways to tackle this problem then please help me!! I want to start my angular learning as soon as possible please!!!

talha281 avatar Mar 21 '20 10:03 talha281

I also face this issue is there a workaround?

bro did you get your problem fixed or you are having same problem now also.

talha281 avatar Mar 21 '20 10:03 talha281

angular

Pourquoi a chaque fois je rencontre ce problème lorsque je veut débuté un projet angular

aliounefall96 avatar Apr 01 '20 02:04 aliounefall96

Screenshot (5)

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

I am also facing the same issue. I tried all the angular cli versions 7 ,8,9, none of them was able to create a new project .tried to change the node versions also presently i am using the v10.21.0. Angular team should fix it ASAP

bommojuvishu avatar Jun 07 '20 04:06 bommojuvishu

I also tried force clean the cache of the npm also

bommojuvishu avatar Jun 07 '20 04:06 bommojuvishu

I also have the same issue currently trying to do a project with Angular. My Angular version 10.0.8 Nodejs version 14.9.0

Help me fix!

Screenshot from 2020-08-31 21-30-36

kronosinc avatar Aug 31 '20 18:08 kronosinc

This seems like a problem with your node/npm and not with Angular CLI.

Please have a look at the fixing npm permissions page, common errors page, npm issue tracker, or open a new issue in that issue tracker if the problem you are experiencing isn't known.

alan-agius4 avatar Oct 19 '20 09:10 alan-agius4

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.