无法查看编译原因...编译失败:(Executor :: NonZeroExitStatus)

时间:2017-09-16 00:57:57

标签: ruby-on-rails elastic-beanstalk devops webpacker

beanstalk上部署。将railswebpacker一起使用。

Compiling…
  Compilation failed:

  (Executor::NonZeroExitStatus)

我们似乎无法获得有关导致编译失败的原因的信息。

我们如何获得更多信息?是否有beanstalk的调试模式?

这些是我们可以看到的最具描述性的错误:

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.

2 个答案:

答案 0 :(得分:0)

我的问题最终是,以node_modules作为所有者创建了root目录,这导致了权限问题。

要弄清楚这一点,我在webpack_compile_output中将true设置为webpacker.yml,然后重新部署。这样做会增加webpacker的日志记录输出,从而揭示了问题所在。

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

希望有帮助。

答案 1 :(得分:-1)

您可以使用eb logs尾部日志是最常用日志文件的最后100行。

您可以在此处阅读有关日志的更多信息:

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

同时ssh机器并检查/共享此日志 - “/var/log/directory-hooks-executor.log”。