components icon indicating copy to clipboard operation
components copied to clipboard

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

Open oustn opened this issue 10 years ago • 9 comments

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",

oustn avatar Sep 28 '16 11:09 oustn

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

spock123 avatar Sep 28 '16 11:09 spock123

@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 avatar Sep 28 '16 12:09 wallace41290

@wallace41290 ahh I see.

spock123 avatar Sep 28 '16 12:09 spock123

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

aroop avatar Sep 28 '16 13:09 aroop

@wallace41290 Yes. That's what I mean.

oustn avatar Sep 29 '16 02:09 oustn

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.

qdouble avatar Sep 29 '16 19:09 qdouble

@wallace41290 Thank you +1

xtianus79 avatar Oct 20 '16 15:10 xtianus79

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

jelbourn avatar Nov 04 '16 01:11 jelbourn

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.