[RUBY] [Rails] About Uglifier :: Error: Unexpected token: at the time of deployment

Introduction

Error when deploying Uglifier::Error: Unexpected token:

I will describe the solution of

Solution

config/environments/production.rb


config.assets.js_compressor = :uglifier

Edit the above description to the following description ⬇︎

config/environments/production.rb


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

Don't forget to commit push after editing!

That was the solution.

Recommended Posts

[Rails] About Uglifier :: Error: Unexpected token: at the time of deployment
About the behavior at the time of error of Files.copy (pathA, pathB)
About the error message Invalid redeclaration of'***'
[Rails] About the error when displaying the screen due to the autofocus of the form
[Rails] How to solve "Uglifier :: Error: Unexpected character'`'"
[Heroku] At the time of deployment We're sorry, but something went wrong. Solution
[Rails] What to do when the Refile image is not displayed when writing the processing at the time of Routing Error
Environment construction method and troubleshooter at the time of joint development (rails, docker and github)
Speed comparison at the time of generation at the time of date conversion
[Rails error] unexpected tIDENTIFIER
[JavaScript] I can't get the response body at the time of error with axios (ajax)
[Android] Exit the activity of the transition source at the time of screen transition
A note about the seed function of Ruby on Rails
About the handling of Null
about the where method (rails)
About the description of Docker-compose.yml
[Rails] Get access_token at the time of Twitter authentication with Sorcery and save it in DB
[Rails] Talk about paying attention to the return value of where
About the behavior of ruby Hash # ==
[Rails] Japanese localization of error messages
[Rails] About the Punk List function
[Rails] Check the contents of the object
[Rails] Unexpected validation error in devise
About the symbol <%%> in Rails erb
Explanation of the order of rails routes
About error handling of comment function
[Rails] About implementation of like function
Check the migration status of rails
About the role of the initialize method
Think about the 7 rules of Optional
[Rails] syntax error, unexpected tSTRING_END, expecting'''
Summary about the introduction of Device
About the log level of java.util.logging.Logger
[Rails] AWS deployment error encounter summary
What you are doing in the confirmation at the time of gem update
The unrecognized selector sent to instance error also appears at this time.
[Register multiple photos] Register multiple rails images at the same time Primitive power technique
[Rails] About the error that the image is not displayed in the production environment
Email sending function with Action Mailer at the time of new registration
Be aware of getting out of Rails beginners (* will be added at any time)
How to implement the email authentication function at the time of user registration
[Rails] How to solve the time lag of created_at after save method
[ERROR message display] A simplified version that can be used at any time with the rails partial template.