joaogarin / angular-electron

Angular2 and Electron starter using webpack
150 stars 53 forks source link

File to import not found or unreadable: @angular/material/core/theming/all-theme. #65

Closed briosheje closed 7 years ago

briosheje commented 7 years ago

Had this issue on windows when running npm run build

Checked this: https://github.com/angular/material2/issues/2277

So I've changed:

@import '~@angular/material/core/theming/all-theme';

to:

@import '~@angular/material/theming';

and it's working now. It looks like they have changed this lately (about 12 days ago)

joaogarin commented 7 years ago

Tks for the issue will take a look and update. I guess this is a newer version that introduced some breaking changes on material's side.

briosheje commented 7 years ago

@joaogarin Yep.

I also had to add "@angular/animations": "^4.0.0", in the package.json, it was throwing an error when building, not sure whether it's still a change related to Angular Material itself :)

joaogarin commented 7 years ago

This should be fixed in https://github.com/joaogarin/angular-electron/commit/6bbcd1d5b21a7d0905a9fd64042c8dcf9f4c7985

hemavidal commented 7 years ago

I had the same problem today!

ERROR in ./src/app/components/app.theme.scss Module build failed: @import '~@angular/material/core/theming/all-theme'; ^ File to import not found or unreadable: ~@angular/material/core/theming/all-theme. Parent style sheet: stdin in C:\Users\hemav\Documents\angular2-electron\src\app\components\app.theme.scss (line 1, column 1) @ ./src/app/components/app.component.ts 31:17-44 @ ./src/app/app.ts

The code was changed in joaogarin/angular-electron@6bbcd1d but the problem still appear.

briosheje commented 7 years ago

@hemavidal

you need to change app.theme.scss, replace:

@import '~@angular/material/core/theming/all-theme';

with @import '~@angular/material/theming';

if you check the code changes in https://github.com/joaogarin/angular-electron/commit/6bbcd1d5b21a7d0905a9fd64042c8dcf9f4c7985 he didn't (yet) change the .scss file.

joaogarin commented 7 years ago

Alright tks guys updated it here https://github.com/joaogarin/angular-electron/commit/91a841d72034ccbde9a34b6a939192651fac2105#diff-759ecc13f2ecebf5743fe0c5fd986262R1