Open TheConstructor opened 1 year ago
Any fix for this issue?
Encountering the same issue without pnp
Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
HookWebpackError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Can't find stylesheet to import.
╷
5 │ @forward '../cdk/a11y/index.import';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
@angular\material\_theming.scss 5:1 @import
update: found out that "@angular/cdk": "17.0.0",
was installed instead of v16 after upgrading Angular to v17 (keeping Material on v16)
Is this a regression?
The previous version in which this bug was not present was
No response
Description
As reported in #24128 and maybe fixed in #24536 using yarn in pnp mode means, that there is no predefined path-relation between @angular/material and @angular/cdk. Still https://github.com/angular/components/blob/main/src/material/_theming.scss (and others) user relative paths to access cdk-files and
@forward
them.I realize, that there is a test-case specifically for this (https://github.com/angular/components/blob/main/integration/yarn-pnp-compat/), but it may be just not fully test the situation as it uses
"@angular/cdk": "file:../../dist/releases/cdk"
and"@angular/material": "file:../../dist/releases/material",
in https://github.com/angular/components/blob/main/integration/yarn-pnp-compat/package.json, thus keeping the path relation between @angular/material and @angular/cdk.Reproduction
Steps to reproduce:
package.json
to e.g. reference"@angular/cdk": "^16.0.3"
and"@angular/material": "^16.0.3"
yarn install
@import '@angular/material/theming';
as second line tosrc/styles.scss
yarn run build
Expected Behavior
This should build
Actual Behavior
Environment