Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng add --registry not working #16766

Closed
1 of 15 tasks
SansDK opened this issue Jan 27, 2020 · 1 comment · Fixed by #16880
Closed
1 of 15 tasks

ng add --registry not working #16766

SansDK opened this issue Jan 27, 2020 · 1 comment · Fixed by #16880
Labels
area: angular/cli freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Milestone

Comments

@SansDK
Copy link

SansDK commented Jan 27, 2020

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

Unsure, probably not.

Description

When trying to install a package with ng add from a local npm registry, using ng add package-name --registry=http://localhost:4873/ (Verdaccio in my case), ng add seems to ignore the --registry parameter and continues to try and pull the package from the registry url set in npm config.

If I set the npm registry to localhost manually, ng add works fine.
npm config set registry http://localhost:4873

Previous issue which asked for this feature: #14189.
PR which supposedly added this feature: #14285.

🔬 Minimal Reproduction

Prerequisites:

  • Have Verdaccio or any other private / local npm registry running.
  • Have some package published in the private registry.

Steps:

  1. Generate new Angular project with ng new.
  2. Run ng add package-name --registry=http://localhost:4873, replace package name and url with your own.
  3. It will now throw an error because it can't find the package on https://registry.npmjs.org/, obviously.

🔥 Exception or Error

An unhandled exception occurred: npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/package-name - Not found
npm ERR! 404
npm ERR! 404  'package-name@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

🌍 Your Environment

Angular CLI: 8.3.23
Node: 13.0.1
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.23
@angular-devkit/build-angular     0.803.23
@angular-devkit/build-optimizer   0.803.23
@angular-devkit/build-webpack     0.803.23
@angular-devkit/core              8.3.23
@angular-devkit/schematics        8.3.23
@angular/cli                      8.3.23
@ngtools/webpack                  8.3.23
@schematics/angular               8.3.23
@schematics/update                0.803.23
rxjs                              6.4.0
typescript                        3.5.3
webpack                           4.39.2
@alan-agius4 alan-agius4 added area: angular/cli freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix labels Jan 28, 2020
@ngbot ngbot bot modified the milestone: Backlog Jan 28, 2020
@clydin clydin self-assigned this Feb 7, 2020
@clydin clydin modified the milestones: Backlog, 9.0.x Feb 7, 2020
clydin added a commit to clydin/angular-cli that referenced this issue Feb 7, 2020
clydin added a commit to clydin/angular-cli that referenced this issue Feb 7, 2020
dgp1130 pushed a commit that referenced this issue Feb 11, 2020
dgp1130 pushed a commit that referenced this issue Feb 11, 2020
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 13, 2020
@clydin clydin removed their assignment Jun 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: angular/cli freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants