Skip to content
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

Compilation Hangs #128

Closed
micahlmartin opened this issue Mar 12, 2015 · 38 comments
Closed

Compilation Hangs #128

micahlmartin opened this issue Mar 12, 2015 · 38 comments

Comments

@micahlmartin
Copy link

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",
@prayerslayer
Copy link

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.

@alexduan
Copy link

@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.

@prayerslayer
Copy link

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.

@eldh
Copy link

eldh commented May 25, 2015

Also been getting this lately, also using sass-loader (1.0.1 & node-sass 3.0.0). Doesn't happen every time though.

@piotrfonte
Copy link

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.

@mmahalwy
Copy link

Any updates on this?

@brandondurham
Copy link

Oh boy. Just added one new module and it's stalling. Works fine if I remove it.

simon-johansson added a commit to simon-johansson/Quizify that referenced this issue Jul 7, 2015
There is a bug in node-sass that makes Webpack hang when importing
SASS files several times. See the following links for more info:

* webpack/webpack-dev-server#128
* webpack-contrib/sass-loader#100
@m00s
Copy link

m00s commented Jul 8, 2015

+1

@thiagopnts
Copy link

uh, same thing here

@nkbt
Copy link
Contributor

nkbt commented Jul 23, 2015

UV_THREADPOOL_SIZE=100 webpack works for me

@9nix00
Copy link

9nix00 commented Aug 7, 2015

@nkbt +1

this works for me. thanks!

@aj0strow
Copy link

@nkbt thanks! Works for me too.

@nkbt
Copy link
Contributor

nkbt commented Aug 16, 2015

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.

@brandondurham
Copy link

Updating worked for me!

@m00s
Copy link

m00s commented Sep 4, 2015

Worked for me too updating sass-loader

@alexilyaev
Copy link

I'm still having an issue with this after updating sass-loader to 2.0.1.
webpack-contrib/sass-loader#100 (comment)

@elsigh
Copy link

elsigh commented Jan 25, 2016

I still have this issue after updating sass-loader to 2.0.1 as well

@mark-norgate
Copy link

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.

@liebowitz
Copy link

@mark-norgate Try removing @import statements from your stylesheets one by one. This worked for me...

@mark-norgate
Copy link

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.

@SpaceK33z
Copy link
Member

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.

@elsurudo
Copy link

elsurudo commented May 2, 2017

I don't have a minimal case for this right now, but for what it's worth, I'm still encountering this issue.

@martinbliss
Copy link

@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.)

@chuckhacker
Copy link

Also experiencing this problem with a fairly minimal configuration with nothing too crazy in it.

webpack.config.js.txt

@chuckhacker
Copy link

This really needs re-opened.

@virtualfunction
Copy link

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)

@tfrijsewijk
Copy link

Same here inside docker on windows

@mohammedgqudah
Copy link

same :(

@peteromano
Copy link

peteromano commented Jan 14, 2019

+1 For re-opening.

This is happening with Windows WSL Ubuntu, as well. Mac OS X doesn't have an issue.

WDS (port 8082) fails or is pending.

image

@sadortun
Copy link

Got the same issue on docker alpine. Anyone found a fix to this ?

@popadko
Copy link

popadko commented Jun 25, 2019

Compilation hangs for me on docker under OSX host. @sadortun What host do you use?

@sadortun
Copy link

@olegpopadko i am building from a terminal

@alexander-akait
Copy link
Member

@peteromano can you create minimum reproducible test repo
@sadortun do you use wsl too?

@aizen3
Copy link

aizen3 commented Jul 8, 2019

same issue with me with vue cli

@ChristopherHaws
Copy link

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.

@jchook
Copy link

jchook commented Nov 15, 2019

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.

@sadortun
Copy link

sadortun commented May 4, 2020

@evilebottnawi No, i am building in an alpine image

@ARtSSt
Copy link

ARtSSt commented Aug 13, 2021

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests