Rails 5 Heroku deploy error: ExecJS::ProgramError: SyntaxError: Unexpected token: name (autoRegisterNamespace)

前端 未结 6 559
刺人心
刺人心 2021-01-07 23:01

When trying to deploy a rails 5 app to heroku, I get the following error, when it reaches Running: rake assets:precompile:

remote:        ExecJS         


        
6条回答
  •  长发绾君心
    2021-01-07 23:54

    I also had this issue.

    It's important to remember that by default Heroku is precompiling in a production environment. When you run rake assets:precompile locally it's typically a development environment, which for me didn't exhibit the issue.

    So in order to reproduce the issue locally, try

    RAILS_ENV=production rake assets:precompile --trace

提交回复
热议问题