Having trouble deploying my Rails app on Heroku I get this - Error: Cannot find module '@babel/compat-data/corejs3-shipped-proposals' Having trouble deploying my Rails app on Heroku I get this - Error: Cannot find module '@babel/compat-data/corejs3-shipped-proposals' heroku heroku

Having trouble deploying my Rails app on Heroku I get this - Error: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'


I was having a similar issue in the CI pipeline for a Rails application.

Per https://github.com/JeffreyWay/laravel-mix/issues/2383#issuecomment-683538859 I did the following to resolve my issue:

  1. Added "@babel/preset-env": "7.9.0" to package.json (by the time you read this the version is likely out of date)
  2. Ran yarn install --check-files
  3. Ran bin/rails webpacker:install
  4. Ran bin/rails webpacker:compile