Can't see reason for Compiling… Compilation failed: (Executor::NonZeroExitStatus)

634 views Asked by At

Deploying on beanstalk. Using rails with webpacker.

Compiling…
  Compilation failed:

  (Executor::NonZeroExitStatus)

We can't seem to get anymore info as to what caused the compilation fail.

How can we get more info? Is there a debug mode for beanstalk?

These are the most descriptive errors we can see:

Webpacker is installed  
Using /var/app/ondeck/config/webpacker.yml file for setting up webpack paths
Compiling…
Compilation failed:. 
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh failed.
3

There are 3 answers

0
Berlin On

You can use eb logs for tail logs are the last 100 lines of the most commonly used log files.

You can read more about logs here:

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.logging.html

Also ssh the machine and check/share this log - "/var/log/directory-hooks-executor.log".

0
lucas On

You can add webpack_compile_output: true to your webpacker.yml to see more details about a failure like this. By default this is turned off.

Source: https://github.com/rails/webpacker/issues/955#issuecomment-503830871

0
KenneyE On

My issue ended up being that the node_modules directory was being created with root as owner, which caused permissions problems.

To figure this out, I set webpack_compile_output to true in webpacker.yml and then re-deployed. Doing that increases the logging output by webpacker, which revealed the problem.

default: &default
  source_path: app/javascript
  source_entry_path: packs
  public_root_path: public
  public_output_path: packs
  cache_path: tmp/cache/webpacker
  check_yarn_integrity: false
  webpack_compile_output: true

Hope that helps.