LoginSignup
2
0

More than 3 years have passed since last update.

Rails5.1+のプロダクション環境で「Uglifier::Error: Invalid assignment」

Posted at

Uglifier::Error: Invalid assignment

...
Uglifier::Error: Invalid assignment
 /opt/rubies/ruby-2.5.1/bin/bundle:23:in `load'
 /opt/rubies/ruby-2.5.1/bin/bundle:23:in `<main>'
 Tasks: TOP => assets:precompile
 (See full trace by running task with --trace) (Executor::NonZeroExitStatus)

バージョン移植の時に遭遇したES6のエラー。Rails5.1+のプロダクション環境で発生するとのこと。

解決

production.rb
config.assets.js_compressor = Uglifier.new(harmony: true)

以上の設定を追記すれば解消。

参照:https://github.com/lautis/uglifier/issues/132

2
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
2
0