LoginSignup
1
0

More than 5 years have passed since last update.

AWS[EC2]で自動デプロイコマンド入力したらエラーが出た

Posted at

はじめに

TwitterでAWSを使えるエンジニアは強いというツイートを見たのでAWSに登録してEC2を進めています。
そこで自動デプロイをしようとしたらエラーが出てきたので少しでも困っている人のためになればと思い、共有したいと思います。

エラー内容

自動デプロイコマンド

ターミナル
bundle exec cap production deploy
ターミナル
Traceback (most recent call last):
    1: from /Users/自分の名前/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/
sshkit-1.18.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/Users/自分の名前/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sshkit-1.18.2/
lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute':
 Exception while executing as EC2のアカウント rake exit status: 1 (SSHKit::Runner::ExecuteError)
rake stdout: Nothing written
rake stderr: Yarn executable was not detected in the system.
Download Yarn at https://yarnpkg.com/en/docs/install
rake aborted!

Uglifier::Error: Unexpected character '`'

Tasks: TOP => assets:precompile

原因

最後から2行目のUglifierというものが悪さをしているみたいです。
なのでこいつを退治します。

解決策

config/environments/production.rbの
config.assets.js_compressor = :uglifierをコメントアウト

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0