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

WebPacker compilation failed #5836

Closed
daegalus opened this issue Nov 28, 2017 · 4 comments
Closed

WebPacker compilation failed #5836

daegalus opened this issue Nov 28, 2017 · 4 comments

Comments

@daegalus
Copy link

daegalus commented Nov 28, 2017

I am following the Docker instructions and I keep hitting this problem, no matter how many times I restart the process. I even did the standalone setup too, and that failed at this exact problem. Standalone was run with RAILS_ENV=production. This is on a fresh install. Am I missing some steps?

[~/mastodon] >> sudo docker-compose run --rm web rake assets:precompile
Starting mastodon_redis_1 ...
Starting mastodon_db_1 ... done
Creating mastodon user (UID : 991 and GID : 991)...
Updating permissions...
Executing process...
I, [2017-11-28T05:03:58.026794 #99]  INFO -- : Writing /mastodon/public/assets/doorkeeper/admin/application-50d68ad91b15067c63771e4811d971d7a56406c472a878021d1fb95d066efd8d.css
I, [2017-11-28T05:03:58.032159 #99]  INFO -- : Writing /mastodon/public/assets/doorkeeper/admin/application-50d68ad91b15067c63771e4811d971d7a56406c472a878021d1fb95d066efd8d.css.gz
I, [2017-11-28T05:03:58.121228 #99]  INFO -- : Writing /mastodon/public/assets/doorkeeper/application-29873392fba1f6a4fd5359214f854d900e24920096164f6e5343dbc0de69df0d.css
I, [2017-11-28T05:03:58.123040 #99]  INFO -- : Writing /mastodon/public/assets/doorkeeper/application-29873392fba1f6a4fd5359214f854d900e24920096164f6e5343dbc0de69df0d.css.gz
I, [2017-11-28T05:04:14.646342 #99]  INFO -- : Writing /mastodon/public/assets/pghero/application-a013dbdf269bc5d5f3610778edb4075c172f162ee90827f8839c4e8128a3a54d.js
I, [2017-11-28T05:04:14.654569 #99]  INFO -- : Writing /mastodon/public/assets/pghero/application-a013dbdf269bc5d5f3610778edb4075c172f162ee90827f8839c4e8128a3a54d.js.gz
I, [2017-11-28T05:04:14.694084 #99]  INFO -- : Writing /mastodon/public/assets/pghero/application-c2618b70600dfedb0f3ba1f916d97a2f93a3f265aba10356abb763bd663d0cbd.css
I, [2017-11-28T05:04:14.697112 #99]  INFO -- : Writing /mastodon/public/assets/pghero/application-c2618b70600dfedb0f3ba1f916d97a2f93a3f265aba10356abb763bd663d0cbd.css.gz
Webpacker is installed 🎉 🍰
Using /mastodon/config/webpacker.yml file for setting up webpack paths
Compiling…
Compilation failed:

[BABEL] Note: The code generator has deoptimised the styling of "/mastodon/node_modules/emoji-mart/dist-es/data/data.js" as it exceeds the max of "500KB".
[~/mastodon] >> docker -v
Docker version 17.09.0-ce, build afdb6d4
[~/mastodon] >> docker-compose -v
docker-compose version 1.17.1, build 6d101fb
[~/mastodon] >> node -v
v6.12.0
[~/mastodon] >> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 17.04
Release:        17.04
Codename:       zesty
@astronaut-wannabe
Copy link

@daegalus I usually see this if you run out of memory during the build process (how much ram does your machine have?)

If it is a RAM issue, you can get around it by creating a swapfile on disk:

sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

See this blog post for a better explanation on the swapfile

@corbindavenport
Copy link

@astronaut-wannabe Thanks for the tip, that actually helped me in my installation process.

@benharri
Copy link

benharri commented May 1, 2018

I'm seeing this issue on a machine with 22GB RAM free. Not sure why this is happening.

@ftpmorph
Copy link

@daegalus I usually see this if you run out of memory during the build process (how much ram does your machine have?)

If it is a RAM issue, you can get around it by creating a swapfile on disk:

sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

See this blog post for a better explanation on the swapfile

Thank you for this. Had this problem with the Glitch fork, thought I was doing something wrong or had messed up a config somewhere, but it was a RAM issue all along. Added some RAM to my VPS, added some swap just in case, and it worked perfectly.

For others using Glitch it needs more RAM to compile due to having two interface options, as it says in the docs. What this means in a practical sense is you need more than 2GB RAM to build it. I doubled mine to 4GB and it compiled without a hitch.

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

6 participants