saleor: Getting an error when trying to run 'yarn run build-assets'

Made it work on local(Mac). Setting it up on Ubuntu(ec2) has been an uphill task

ModuleBuildError: Module build failed: TypeError: Buffer.alloc is not a function at n (/home/ubuntu/git/saleor/node_modules/to-ico/index.js:15:21) at /home/ubuntu/git/saleor/node_modules/to-ico/index.js:90:18 at process._tickCallback (node.js:368:9) at DependenciesBlock.onModuleBuildFailed (/home/ubuntu/git/saleor/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19) at nextLoader (/home/ubuntu/git/saleor/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31) at /home/ubuntu/git/saleor/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15 at context.callback (/home/ubuntu/git/saleor/node_modules/webpack-core/lib/NormalModuleMixin.js:148:14) at /home/ubuntu/git/saleor/node_modules/favicons-webpack-plugin/lib/favicons.js:32:23 at /home/ubuntu/git/saleor/node_modules/favicons-webpack-plugin/lib/favicons.js:56:21 at /home/ubuntu/git/saleor/node_modules/favicons/es5.js:193:28 at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:52:16 at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:696:30 at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:167:37 at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:1209:30 at /home/ubuntu/git/saleor/node_modules/favicons/es5.js:143:24 at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:52:16 at done (/home/ubuntu/git/saleor/node_modules/async/lib/async.js:241:17) at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:44:16 at /home/ubuntu/git/saleor/node_modules/favicons/es5.js:137:25 at /home/ubuntu/git/saleor/node_modules/favicons/es5.js:122:24 at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:726:13 at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:52:16 at done (/home/ubuntu/git/saleor/node_modules/async/lib/async.js:241:17) at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:44:16 at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:723:17 at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:167:37 at /home/ubuntu/git/saleor/node_modules/favicons/es5.js:110:24 at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:52:16 at done (/home/ubuntu/git/saleor/node_modules/async/lib/async.js:241:17) at /home/ubuntu/git/saleor/node_modules/async/lib/async.js:44:16 at /home/ubuntu/git/saleor/node_modules/favicons/es5.js:107:28 at process._tickCallback (node.js:368:9) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 25 (6 by maintainers)

Most upvoted comments

Ok, making sure adequate swap file exists seems to do the trick even on the digitalocean droplet.

It seems we should at least add --display-error-details to webpack options in package.json.

I was using a nano instance on aws, had to use 4gb in swap so it could run that task. We should add a warning for that issue and the possible solution. I also had to install libfontconfig to make it work…again, nice to know that from the docs.

What solved the issue for me was, increasing the VM memory from 1GB to 2GB.

Alright, I resolved that. I use “–display-error-details=true” and got the detailed error. It turned out I didn’t have libfontconfig. I installed it and passed yarn build-assets.

I’m getting error on build-assets too. I am using node version 6.10.3. My error is different:

events.js:160 throw er; // Unhandled ‘error’ event ^

Error: write EPIPE at exports._errnoException (util.js:1018:11) at WriteWrap.afterWrite (net.js:800:14) verbose 6.863 Error: Command failed with exit code 1. at MessageError (/home/user/.nvm/versions/node/v6.10.3/lib/node_modules/yarn/lib/errors.js:8:5) at /home/user/.nvm/versions/node/v6.10.3/lib/node_modules/yarn/lib/util/execute-lifecycle-script.js:203:15 at throw (native) at step (/home/user/.nvm/versions/node/v6.10.3/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30) at /home/user/.nvm/versions/node/v6.10.3/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:30:13 at process._tickCallback (internal/process/next_tick.js:109:7) error Command failed with exit code 1.