[v2] gatsby build hangs on WSL Ubuntu
See original GitHub issueDescription
Build hangs on “Building production Javascript and CSS bundles,” after “bootstrap finished.” This doesn’t happen on Gatsby v1, or with gatsby develop
.
Steps to reproduce
- Make a new gatsby site using command:
gatsby new tutorial-part-one https://github.com/gatsbyjs/gatsby-starter-hello-world#v2
. - Run
gatsby build
.
Expected result
Gatsby should build the production site.
Actual result
Gatsby hangs on “Building production Javascript and CSS bundles.” I let it run for 10 minutes and then quit. This occurs on both the gatsby-cli
Environment
- System:
- OS: Linux 4.4 Ubuntu 16.04.4 LTS (Xenial Xerus) (wsl on Windows build 17692)
- CPU: x64 Intel® Core™ i7-8550U CPU @ 1.80GHz
- Shell: 5.1.1 - /usr/bin/zsh
- Binaries:
- Node: 8.11.3 - /usr/local/bin/node
- npm: 6.2.0 - /usr/local/bin/npm
- npmPackages:
- gatsby: next => 2.0.0-beta.46
- gatsby-plugin-react-helmet: next => 3.0.0-beta.3
- npmGlobalPackages:
- gatsby-cli: 2.0.0-beta6
- also occurs on -gatsby-cli: 1.1.58
File contents (if changed)
gatsby-config.js
: N/A
package.json
: N/A
gatsby-node.js
: N/A
gatsby-browser.js
: N/A
gatsby-ssr.js
: N/A
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Gatsby doesn't seem to build on Windows Subsystem ...
Fix: Update to WSL2 by following the instructions here: https://learn.microsoft.com/en-us/windows/wsl/wsl2-kernel.
Read more >Install Gatsby.js on Windows
Open your WSL terminal (ie. Ubuntu 18.04). Use npm to install the Gatsby CLI: npm install -g gatsby-cli . Once installed, check the...
Read more >Running gatsby develop just hangs forever : r/gatsbyjs
I've tried changing my node version, updating yarn and even removing it from the machine entirely. Nothing works. Any ideas?
Read more >Learning React and Gatsby by building a blog - dev
When I run the gatsby develop develop command, ... You mentioned WSL, but seeing as WSL2 will only support a “proper” Linux kernel...
Read more >A quick speed up for node/gatsby Development on ...
The tooling works great, but WSL2 is a little slow for files shared between ... move_node_modules.sh can greatly speed up builds! Wsl 2....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Guys, looking for a workaround, I found out that the problem is caused during the uglify process when using wsl (there are some notes at webpack git talking about uglify hanging when parallel: true).
Setting parallel:false in node_modules/gatsby/dist/utils/webpack-utils.js -> plugins.minifyJs solved the issue for me.
Maybe it can be useful =]
This issue has been fixed in #12636