-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
SASS files from NPM modules referencing relative imports won't build #4053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think I've got the same issue. Styles load normal for build/serve, however they cannot resolve for unit testing with mocha. Reproduction with a fresh vue cli project:
Does anyone have any idea why? I've been debugging for a few hours, no clue why it's not working. |
Confirming seeing the same issue using the ~@ shortcut...
package.json
|
the same issue |
Fix: just remove special characters and spaces from project path ("C#" name of folder for example renamed to CSharp). |
Same problem, and I've been looking for a couple of hours and no success. My path doesn't contain any special characters, as @grandsilence suggested. |
same issue |
1 similar comment
same issue |
same issue, I do not have special characters in my path, either (using debian/linux). Any solution or workaround? |
I also encountered the same problem, but there is no problem with node-sass. |
I'm having the same issue in new project. Created structure using vue-cli/sass/mocha. Have global
It's working just fine when using serve/build, but unit-tests (yarn test:unit) throwing an error:
Anyone has solved the issue? It seems strange that in such large well-known project unit-tests with scss just not working and an issue is open for a few month. |
The only valid workaround I know of is using |
I think the issue relates to how The document suggests replacing all CSS modules with a
The file
(note: you need to install the null-loader and possibly edit the rule tests to requirements)
I'm using this as a temporary workaround. The good part is that its is much quicker to run tests without having to run CSS Preprocessors. However I still don't understand the root cause of the failure and this workaround does not run in the context of the |
Just occurred to me that this change can be made using webpack chaining.
Not perfect but than the previous attempt |
You are right,The solution can also be |
i don’t want to use any framework integration or wrapper! |
I'm having this problem using laravel-mix. Anyone here been able to fix it? |
https://material.io/develop/web/docs/getting-started/ |
Came across this today, this bug still exists. Used @robbishop's solution and it seems to work.
|
same issue, solved by removing
from vue.config.js |
Here's what worked for me based on robbishop's solution:
This assumes that your |
the same issue |
Version
3.7.0
Reproduction link
https://github.com/christophehenry/mrt
Environment info
Steps to reproduce
git clone https://github.com/christophehenry/mrt.git && cd mrt
npm i
npm run test:unit
What is expected?
Test run correctly
What is actually happening?
sass-loader
will crash with error stating relative imports of NPM module can't be found.Full stacktrace:
The text was updated successfully, but these errors were encountered: