You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Building in docker container failing / extremely slow #758
I'm trying to build an app with typescript in a docker container (for CI/CD) but the build (using webpack, babel, as per NextJS) never finishes and eventually exits when it hits timeout.
When I build the app (with prod env) locally, not inside the container, the build works fine and finishes after 15s. In a docker container (tried alpine and ubuntu), it hangs at 100% CPU, slowly filling memory, with low I/O.
I'm using NextJS with @zeit/next-typescript - already asked for guidance over there but to no avail.
I'm using webpack@3.11.0, ts-loader@3.5.0 and typescript@latest. Unfortunately I can't just upgrade to webpack 4 for the new ts-loader versions for testing - locked in by NextJS. I tried with various typescript versions, the only difference is that some of them leak memory more than others. ;-) But the result stays the same.
Anyone ever experience a similar issue, especially within a docker container?
As far as I can tell, this is not a ts-loader issue and so I'm closing this issue. I hope you get your issue sorted. Please feel free to re-open if you identify a specific ts-loader problem
I know this is a very broadly stated issue. Sorry if I can’t be more specific. Nevertheless I would greatly appreciate any kind of suggestion as to what I should be looking for, if possible.
I think ts-loader is caught up in an endless loop but I can’t say for sure due to the lack of verbosity in the console output. The configuration is basic, other than path mappings in tsconfig, there’s nothing special about it.
Are there any options for ts-loader to get more verbosity as to what’s currently happening?
Am 09.04.2018 um 07:07 schrieb John Reilly ***@***.***>:
As far as I can tell, this is not a ts-loader issue and so I'm closing this issue. I hope you get your issue sorted. Please feel free to re-open if you identify a specific ts-loader problem
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
For some ( ¯\_(ツ)_/¯ ) reason, builds that are being run in the root of a docker image hang. Moved everything into a subdirectory and it magically works. Somewhere (anywhere from webpack through babel including tsc) a file glob pattern is not expecting to be run in the root directory .. or so. But I don't feel like digging deeper on that end, either.
Thanks for the great work you do on this library and all the best!
Reacted by John Reilly, Christian Theilemann, Cole Howard, Jan Peter, Oren Schwartz, Cody Carse, lapwat and Herz3h
Reacted by mikebyte, Jan Peter, lapwat, Herz3h and Kiven
Activity
johnnyreilly commentedon Apr 9, 2018
As far as I can tell, this is not a ts-loader issue and so I'm closing this issue. I hope you get your issue sorted. Please feel free to re-open if you identify a specific ts-loader problem
genox commentedon Apr 9, 2018
johnnyreilly commentedon Apr 9, 2018
You could up the log level to info: https://github.com/TypeStrong/ts-loader/blob/master/README.md#loglevel-string-defaultwarn
There's also a trace option you could try including
genox commentedon Apr 9, 2018
I figured it out eventually.
For some (
¯\_(ツ)_/¯) reason, builds that are being run in the root of a docker image hang. Moved everything into a subdirectory and it magically works. Somewhere (anywhere from webpack through babel including tsc) a file glob pattern is not expecting to be run in the root directory .. or so. But I don't feel like digging deeper on that end, either.Thanks for the great work you do on this library and all the best!
johnnyreilly commentedon Apr 9, 2018
Thanks for reporting back! It's always good to know where things get to 😄
chris-vest commentedon Apr 17, 2018
@genox Thanks for the fix on that, was having the same problem!
wchatx commentedon Sep 12, 2018
@genox same problem and your fix solved it. thanks!
mikebyte00 commentedon Oct 15, 2018
@genox same problem here - thank you! You've saved me a lot of time with this niche issue.
OrenSchwartz commentedon Nov 24, 2018
+1 for the fix suggested by @genox
ilteoood commentedon Nov 29, 2018
+1 for the suggestion of @genox
Try putting everything in a subdirectory