Skip to content

ng update migrations not working on npm linked custom schematics #15511

@bmayen

Description

@bmayen

🐞 Bug report

Command (mark with an x)

- [x] update

Description

I have custom schematics to generate a new application using ng new -c my-custom-schematics. I am attempting to add migrations so I can update my applications when the schematics are updated, using ng update my-custom-schematics. During development of these migrations, if I npm link my-custom-schematics in the generated application and run ng update my-custom-schematics --migrate-only --from=1 I receive the error "Package found in package.json but is not installed." If I copy the package to the application's node_modules folder, it works fine. The problem only arises using npm link.

🔬 Minimal Reproduction

  1. Generate a new application using custom schematics.
  2. Update the schematic to include migrations to a new version.
  3. npm link the application to the new version of the schematics
  4. Run ng update my-custom-schematics --migrate-only --from=1

🔥 Exception or Error


Package found in package.json but is not installed.

Anything else relevant?

Not receiving the error if I copy the package to the application's node_modules folder. Only occurs if the schematics package is npm linked.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions