-
-
Notifications
You must be signed in to change notification settings - Fork 432
Webpack hanging when importing multiple files with the same dependency #99
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'm embarrassed to admit I spent the majority of my day making no progress with this bug. I couldn't replicate it with a simpler setup so I'm assuming it's an edge case bug to do with my dependency graph. Regardless, downgrading to |
@rbhalla I encountered a similar issue in a complicated project, and also could not replicate it with a simple example I could post here for debugging. Eventually I narrowed it down to an issue in node-sass that hangs the process if it has to compile more than 5 files simultaneously (see sass/node-sass#857). In a multi-threaded model, including the same dependency in a complex graph triggered that problem for me. The solution that worked for me was to temporarily override the limit in Node during the execution of webpack+sass loader. In my OSX pipeline it looks like this:
To make the process easier, I created a Makefile like so:
Then I can just run "$ make front-server" and it will launch the dev server, or "$ make front-build" to compile for production. In your case it looks like you are using your own middleware (instead of webpack-dev-server), so perhaps "$ env UV_THREADPOOL_SIZE=55 node myassetcomipler.js" will work for you. edit: This worked with node-sass v3.* and sass-loader v1.* |
Probably also related to #100? |
Same problem, how exactly do you set UV_THREADPOOL_SIZE? |
Either run your gulp command with |
Oh God! Been dealing with this the whole *** day until I've found out it's sass thing and came here. Thank u guys, |
I have 3
.js
. files, importing 3 separate.scss
files. Each.scss
file however imports the same (variables) file.When I try and run webpack now, it hangs. If I remove the variables file dependency from any of the files, it suddenly works. In any of the
.js
files, if I stop importing the.scss
file, it works.Does anyone have any idea of what might be causing this?
My webpack config in case it helps:
The text was updated successfully, but these errors were encountered: