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 breaks on "private" packages #28834

Open
SanderElias opened this issue Nov 11, 2024 · 1 comment
Open

ng update breaks on "private" packages #28834

SanderElias opened this issue Nov 11, 2024 · 1 comment

Comments

@SanderElias
Copy link

SanderElias commented Nov 11, 2024

Command

update

Description

I'm unsure if this is a regression. But when there is a "private" package in an angular project, ng update fails to run.

Minimal Reproduction

To reproduce:

# use an "old" version to get started
npx @angular/[email protected] new DemoPackageIssue
cd DemoPackageIssue
# add a package from the deno std library (not really private..)
npx jsr add @std/toml
# try to upgrade:
npx ng update

Or manually add the package to the package.json like this:

  "dependencies": {
    "@angular/animations": "^18.1.0",
    ...
    "@std/toml": "npm:@jsr/std__toml@^1.0.1",
  },

Exception or Error

Using package manager: npm
Collecting installed dependencies...
Found 28 dependencies.
✖ Migration failed: 404 Not Found - GET https://registry.npmjs.org/@std%2ftoml - Not found
  See "/tmp/ng-f4tUqx/angular-errors.log" for further details.

Image

Your Environment

I didn't test it with anything older as 18.0, but I suspect _all_ versions have this issue. 
At least 19-rc.1 still has the problem

Anything else relevant?

This is an unneeded restriction. When there are packages in the package.json that Angular can't 'trace' it should be safe to ignore them. Erroring out is highly inconvenient.

@antonioconselheiro
Copy link

This issue can be reproduced in this repository: https://github.com/antonioconselheiro/bug-ng-update-with-jsr-dependencies
Not only private packages, but any package from jsr throw error.

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

No branches or pull requests

3 participants