I am developing a no standalone angular app with the command --no-standalone but when I'm trying to add @angular/material, it throws the following error:
Cannot find module '..\node_modules\@schematics\angular\private\components.js'
This is an issue with the Angular CLI's code to determine the compatible version of the package to add. The code changes to fix the issue have been merged, however for now only into the v19 branch.
As a workaround, you can specify the major version of Angular Material like the following:
ng add @angular/material@18
npx @angular/cli@18 new ng18-app --no-standalone --no-ssr --style=scss, navigating to the newly created folder and runningng add @angular/material. Strangely, the schematics tried to add Angular Material v17 which seems wrong. There is a related open GitHub issue: github.com/angular/components/issues/30090