Skip to content

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

Closed

Description

@oustn

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

Activity

  1. spock123 commented on Sep 28, 2016

    @spock123

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

  2. wallace41290 commented on Sep 28, 2016

    @wallace41290

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

  3. spock123 commented on Sep 28, 2016

    @spock123

    @wallace41290 ahh I see.

  4. aroop commented on Sep 28, 2016

    @aroop

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

  5. oustn commented on Sep 29, 2016

    @oustn
    Author

    @wallace41290 Yes. That's what I mean.

  6. qdouble commented on Sep 29, 2016

    @qdouble

    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.

  7. xtianus79 commented on Oct 20, 2016

    @xtianus79

    @wallace41290 Thank you +1

  8. jelbourn commented on Nov 4, 2016

    @jelbourn
    Contributor

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

  9. angular-automatic-lock-bot commented on Sep 5, 2019

    @angular-automatic-lock-bot

    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.

  10. locked and limited conversation to collaborators on Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions