Components: It's not clear which file to import for '@import "overlay/overlay"

Created on 28 Sep 2016  路  9Comments  路  Source: angular/components

When I create theme file, the sass throw a error like below:

node_modules/@angular/material/core/_core.scss Error: It's not clear which file to import for '@import "overlay/overlay"

I try to modify the import file in the _core.scss, and it's works.

@import 'overlay/overlay.scss';

I think maybe could change the file name of 'overlay.scss' to '_overlay.scss'

The material and sass version:

"@angular/material": "^2.0.0-alpha.9",
"gulp-sass": "^2.3.1",

Most helpful comment

core/overlay folder has two files overlay.scss and overlay.css(Empty file). Deleting overlay.css fixed this issue for me.

All 9 comments

As far as I understand, you should not import the overlay.scss any longer....

@spock123 I got the same error, if I understand correctly, @oustn is not trying to import overlay directly, but by importing ~@angular/material/core/theming/all-theme', that sass file is importing core.scss which is importing overlay and that is where the error is from. I just went into the core.scss and changed the import to overlay.scss to force the extension for now.

@wallace41290 ahh I see.

core/overlay folder has two files overlay.scss and overlay.css(Empty file). Deleting overlay.css fixed this issue for me.

@wallace41290 Yes. That's what I mean.

Yeah, same issue with using scss. I had to make a script to clear css from the @angular/material directory so there would be no conflicts.

@wallace41290 Thank you +1

Fixed in #1544 which will be included in the next release.

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LoganDupont picture LoganDupont  路  3Comments

alanpurple picture alanpurple  路  3Comments

kara picture kara  路  3Comments

Miiekeee picture Miiekeee  路  3Comments

shlomiassaf picture shlomiassaf  路  3Comments