Sass 'Element is resolved only by name', despite being imported
I have an angular CLI project that uses library projects (same idea project, different directories using the ng6 library workflow). I'm maintaining a 'theme' project that contains global/brand styles.
The issue I'm having is that in my primary project (or other library project files) I am using scss imports as such, since the project is built/installed via NPM as a project dependency:
@import '~theme/src/styles/core/mixins';
Below that, I'm using one of my mixins:
.some-class {
@include myMixin();
}
The @include line is getting flagged with the 'Element myMixin is resolved by name without the use of explicit imports'.
This seems incorrect, since I'm explicitly importing it 3 lines above.
I've used this exact pattern on other projects without issue. node_modules is marked as excluded, but that's also standard to all of my projects (it seems that idea correctly auto-excludes it).
Is there something I need to remember about the '~' import syntax?
Thanks!
Please sign in to leave a comment.
Hello,
What IDE version do you use? It should be fixed in 2018.2: https://youtrack.jetbrains.com/issue/WEB-30041