Compilation Hangs
micahlmartin opened this issue · 38 comments
I'm trying to upgrade to iojs 1.5.1
from 1.2.0
. I'm running into an issue where it gets part way throught the precompilation and then just hangs.
$ webpack-dev-server --content-base public/ --config config/webpack/webpack.server.js --hot --port 25001 --inline --progress
70% 3/3 build moduleshttp://localhost:25001/
webpack result is served from http://localhost:25001/assets/
content is served from /Users/micah/trackr/app/public
69% 707/710 build modules
Here are the webpack modules I'm running:
"webpack-dev-server": "^1.7.0"
"webpack": "^1.7.3",
Do you happen to have sass-loader
in your configuration? Because I had the same issue and as soon as I changed loaders: ['style', 'css', 'autoprefixer', 'sass']
to loader: 'file'
it didn’t hang anymore.
Of course the problem could also be any permutation of the other loaders, but I had issues with sass-loader
before and dropping any one of the others doesn’t help. Also tried Node 0.10.38 and 0.12.1 as well as webpack 1.7.3 and 1.8.4.
In any case, replacing sass-loader
is not really an option for me. Any suggestions what steps could track this problem down? I tried to create a repo reproducing the behavior, but of course it works there.
@prayerslayer I have sass-loader in my configuration and it is definitely causing my webpack to hang. Were you able to get past this? I'm using sass-loader 1.0.2 and node-sass 3.1.1.
Not really, no. I converted my code to LESS in one project and in the other I stayed on sass-loader@0.4.2
and node-sass@2.0.1
—no problems there.
Ah and I think the problem was the definition of an animation with keyframes and all… But don’t press me on this, might be wrong.
Also been getting this lately, also using sass-loader (1.0.1 & node-sass 3.0.0). Doesn't happen every time though.
I have similar issue. It appens when I import one file (say config.scss
holding all my variables) in differing modules’ .scss files (header.scss
, footer.scss
and so on…). Weirdly enough, it hangs when I load that config.scss
in 3-4 places (and more) whereas it works alrite when loading it just in a couple of places.
Plus, when I load my config.scss
in 2 module stylesheets, run the server, import that config in more stylesheets—it works and the bundle is recompiled. It doesn’t work after restarting the server. Hope that’s useful in some way.
EDIT:
PS. Seems to be relate to this.
Any updates on this?
Oh boy. Just added one new module and it's stalling. Works fine if I remove it.
+1
uh, same thing here
UV_THREADPOOL_SIZE=100 webpack
works for me
New version of node-sass
seems to fix the problem. At least on our projects we removed UV_THREADPOOL_SIZE
completely. Update your sass-loader
to >2.0.0
If it works fine for you too, then issue could be closed.
Updating worked for me!
Worked for me too updating sass-loader
I'm still having an issue with this after updating sass-loader
to 2.0.1
.
webpack-contrib/sass-loader#100 (comment)
I still have this issue after updating sass-loader
to 2.0.1
as well
Anyone got a fix for this issue? I don't know if it's the sass-loader that is causing the issue; it seems to hang during/just after ts compilation. Don't seem to be able to get logs out of webpack to see what's upsetting it. --loglevel verbose doesn't seem to output much more.
@mark-norgate Try removing @import statements from your stylesheets one by one. This worked for me...
I discovered a remedy for the problem; even if it is a bit smelly.
I changed this:
./node_modules/.bin/webpack-dev-server --display-reasons --display-chunks --watch --loglevel verbose
To this:
env UV_THREADPOOL_SIZE=128 ./node_modules/.bin/webpack-dev-server --display-reasons --display-chunks --watch --loglevel verbose
Works a treat. It’s the sass-loader that is having problems. Giving it more breathing room like this helps, but it’s still painfully slow.
Mark
From: Greg Liebowitz notifications@github.com
Reply-To: webpack/webpack-dev-server reply@reply.github.com
Date: Wednesday, 24 February 2016 at 15:05
To: webpack/webpack-dev-server webpack-dev-server@noreply.github.com
Cc: Mark Norgate mark.norgate@gmail.com
Subject: Re: [webpack-dev-server] Compilation Hangs (#128)
@mark-norgate Try removing @import statements from your stylesheets one by one. This worked for me...
—
Reply to this email directly or view it on GitHub.
Closing this issue because it doesn't seem to be a problem in webpack-dev-server. I'll gladly re-open if anyone can provide a reduced case where it fails.
I don't have a minimal case for this right now, but for what it's worth, I'm still encountering this issue.
@SpaceK33z This is an active issue. Issuing webpack
alone works just fine (all files are processed and the process exits successfully) but webpack-dev-server
hangs after the webpack compilation step but before the files actually get dumped to disk (I know this because I have a CleanWebpackPlugin
step that gets executed causing the destination folder to get erased before the build.)
Also experiencing this problem with a fairly minimal configuration with nothing too crazy in it.
This really needs re-opened.
Still a BIG issue on on docker under OS X. Seems to be fine in native OS X or Linux (be it native or docker). For me webpack compiles but gets stuck when an asset get modified - It seems to be stuck in a deadlock (using low CPU)
Same here inside docker on windows
same :(
Got the same issue on docker alpine. Anyone found a fix to this ?
Compilation hangs for me on docker under OSX host. @sadortun What host do you use?
@olegpopadko i am building from a terminal
@peteromano can you create minimum reproducible test repo
@sadortun do you use wsl too?
same issue with me with vue cli
I'm having this issue as well, but it seems to be caused by CleanWebpackPlugin
. When I remove it, webpack-dev-server no longer hangs.
For me using https
caused webpack-dev-server
to hang indefinitely.
Edit:
My particular issue appears to derive from bizarre file system issues (with shared files on a guest machine). The dev server could not read my custom https key files, and couldn't proceed.
@evilebottnawi No, i am building in an alpine image
@evilebottnawi No, i am building in an alpine image
were able to resolve this, I am having the same issue
I am getting no error or logs, it's hanging in Docker