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 update can't deal with different package registry #28858

Closed
1 task
antonioconselheiro opened this issue Nov 14, 2024 · 1 comment
Closed
1 task

ng update can't deal with different package registry #28858

antonioconselheiro opened this issue Nov 14, 2024 · 1 comment

Comments

@antonioconselheiro
Copy link

Command

update

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When run ng update in an angular project with dependencies from jsr registry it brokes. It brokes even if the configuration file .npmrc is present with @jsr:registry=https://npm.jsr.io.

Image

This package can be updated by running npm install @nostrify/nostrify@npm:@jsr/nostrify__nostrify@latest, that's a lot of @, but works.
To perform update having that dependencies as it currently is, I must remove then, update angular and then include they again.

Minimal Reproduction

Reproduction:

npm install -g @angular/cli@17
ng new my-project
npx jsr add @nostrify/nostrify @nostr/tools
ng update

You can also reproduce this by clonning this repository and running ng update in devcontainer.

Exception or Error

root@1a8eee8c8227:/bug-update-jsr# ng update
Using package manager: npm
Collecting installed dependencies...
Found 24 dependencies.
✖ Migration failed: 404 Not Found - GET https://registry.npmjs.org/@nostr%2ftools - Not found
  See "/tmp/ng-AfTjrC/angular-errors.log" for further details.

root@1a8eee8c8227:/bug-update-jsr# ng update @angular/cli
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 18.2.11 to perform the update.
✔ Packages successfully installed.
Using package manager: npm
Collecting installed dependencies...
Found 24 dependencies.
Fetching dependency metadata from registry...
✖ Migration failed: 404 Not Found - GET https://registry.npmjs.org/@nostrify%2fnostrify - Not found
  See "/tmp/ng-3BFR3I/angular-errors.log" for further details.

Your Environment

root@1a8eee8c8227:/bug-update-jsr# ng version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 17.3.11
Node: 20.18.0
Package Manager: npm 10.8.2
OS: linux x64

Angular: 17.3.12
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.11
@angular-devkit/build-angular   17.3.11
@angular-devkit/core            17.3.11
@angular-devkit/schematics      17.3.11
@angular/cli                    17.3.11
@schematics/angular             17.3.11
rxjs                            7.8.1
typescript                      5.4.5
zone.js                         0.14.10

There is a exclusive project just to reproduce this bug: https://github.com/antonioconselheiro/bug-ng-update-with-jsr-dependencies

Anything else relevant?

No response

@antonioconselheiro
Copy link
Author

I searched for issues in angular/angular before opening it, but now I see I was directed to angular/angular-cli and my issue is a duplicated of #28834. So, I'm closing it as duplicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant