Skip to content

ng update breaks on "private" packages #28834

Open
@SanderElias

Description

@SanderElias

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/cli@18.1 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions