Mastodon: WebPacker compilation failed

Created on 28 Nov 2017  ·  3Comments  ·  Source: tootsuite/mastodon

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

Most helpful comment

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

All 3 comments

@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

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

almafeta picture almafeta  ·  3Comments

cwebber picture cwebber  ·  3Comments

flukejones picture flukejones  ·  3Comments

sorin-davidoi picture sorin-davidoi  ·  3Comments

ccoenen picture ccoenen  ·  3Comments