Skip to content

bug(schematics): adding package to devDependencies #32630

Closed

Description

@pamartinez-signify

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

ng add @angular/material adds package @angular/material in devDependencies section of package.json

Reproduction

Steps to reproduce:

  1. Create a new angular app
  2. Run ng add @angular/material

Expected Behavior

I would expect @angular/material to be added to dependencies section only, not in devDependencies

Actual Behavior

@angular/material is being added to both sections dependencies and devDependencies

Environment

  • Angular: 21.2.0
  • CDK/Material: 21.2.0
  • Browser(s): -
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

Activity

  1. crisbeto commented on Feb 28, 2026

    @crisbeto
    Member

    This is likely a behavior change in the CLI, we only add the package to the dependencies: https://github.com/angular/components/blob/main/src/material/schematics/ng-add/package-config.ts#L37. I'm guessing we add it to the dependencies and then the CLI comes around and adds it to the devDependencies too. I'll transfer the issue.

  2. added theissue type on Feb 28, 2026
  3. added a commit that references this issue on Mar 2, 2026
    e956a9f
  4. added 2 commits that reference this issue on Mar 2, 2026
    038a931
    ae4c28d
  5. angular-automatic-lock-bot commented on Apr 2, 2026

    @angular-automatic-lock-bot

    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.

  6. locked and limited conversation to collaborators on Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions