-
Notifications
You must be signed in to change notification settings - Fork 12k
bug(*): Issue with ng add @angular/material
in Angular CLI
#28985
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
Comments
To reproduce:
Command output:
Strangely, Angular v17.0.0 is chosen as the compatible version which seems wrong. In a freshly generated Angular 19 app, everything seems to work just fine. Versions:
|
This is likely an issue either with the setup or with the CLI. Transferring to the correct repo. |
The problem appears that you have an outdated version of |
@alan-agius4 I think you misunderstood the issue. When creating a fresh Angular 18 non-standalone workspace without Material, after running |
Sorry I misunderstood the issue. As a workaround you can provide the version specifier. Example: |
… during `ng add` When using the `ng add` command, the package version selection logic was not correctly sorting available versions in ascending order. This could lead to selecting an unintended version of the package. Closes: angular#28985
…der during `ng add` When using the `ng add` command, the package version selection logic was not correctly selected based on the available versions in desc order. This could lead to selecting an unintended version of the package. Closes: angular#28985
this was not fixed. I have the issue today. I force cleared my NPM cache, and create a fresh angular 18.2.12 app, ng add @angular/material, and it chose material v17 again. "found compatible package version: @angular/material@17.0.0" |
@deerbuster The fixed was merged (for v19) but wasn't released yet. Also you have a workaround mentionned in Alan last message. |
Angular project 18.2.13 ng add @angular/material@18 Not working npm resolution error reportWhile resolving: ipovisione-frontend@0.0.0 Could not resolve dependency: Fix the upstream dependency conflict, or retry No one angular material version is working for me in Angular Project cli18 |
Hi guys, I had the same problem with a new Angular 18 project. I installed Angular Material using:
and it gave me the same error message:
Without updating anything other than package.json. I just removed the
I tested it and it worked perfectly! |
Hello, I was getting this same issue. As said above, I removed Now I am getting this,
Any idea about this? |
Check your code for duplicate or missing end tags. |
It was resolved. Thank you @YasminHernandes !! |
…der during `ng add` When using the `ng add` command, the package version selection logic was not correctly selected based on the available versions in desc order. This could lead to selecting an unintended version of the package. Closes: angular#28985 (cherry picked from commit 4ef45ec)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Is this a regression?
The previous version in which this bug was not present was
17.3.5
Description
Dear Angular Team,
I encountered an issue while using the Angular CLI to integrate
@angular/material
into a new project. Here are the steps I followed and the problem I observed:Environment:
Issue:
ng add @angular/material
in the terminal.angular.json
,app.config.ts, styles.css
, etc) were not modified.I also checked the node_modules folder but didn't find any folder named "private"
Reproduction
StackBlitz link: Sorry, I am working on my local machine, so cannot provide the link here.
Steps to reproduce:
ng add @angular/material
Expected Behavior
Should properly install the @angular/material package.
Actual Behavior
Error after installing the package.
Environment
The text was updated successfully, but these errors were encountered: