-
Notifications
You must be signed in to change notification settings - Fork 23
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
Module build failed: TypeError: files.forEach is not a function #18
Comments
What node version are you running on? The latest sass-vars-loader requires node |
I am running 6.10.0. Npm 5.5.1 I will check my config again and update you with what i find,. |
Second guess would be, that you specified |
Closing this issue, feel free to re-open if the issue still exists. |
The issue just resurfaced. const sassVarsConfig = querystring.stringify({
vars : JSON.stringify({
// susyIsDevServer: susyIsDevServer,
// env : METADATA.ENV
// fullHost: METADATA.fullHost
}), // Or use 'files" object to specify vars in an external .js or .json file
files: [path.resolve(Helpers.paths.appRoot + '/assets/styles/sass-js-variables.js')]
}); That is my config. It is an array. What else might cause this?
I'm using Node v8.9.3 now |
Okay, don't use |
If the issue should still persist even without the |
I ran the command and the file does exist. I also removed the JSON.stringify and still files.foreach is not a function. |
I fixed it. I was using
This worked in 2.x, but in 3.x it failed. I removed
and it works. Thanks for the tip! |
Hm right. I wonder if the lib should actually support query string parameters. 🤔 |
It would be good as a fallback support, some people still use that. But load options is the new standard. Maybe it could just throw an error if query string is given, otherwise I don't think it is too hard to parse query string params right? |
After updating 2.2.0 to 3.0.0:
The file exists, but webpack cannot resolve it. Is there a breaking change?
The text was updated successfully, but these errors were encountered: