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:
- Added
"@babel/preset-env": "7.9.0"
to package.json (by the time you read this the version is likely out of date) - Ran
yarn install --check-files
- Ran
bin/rails webpacker:install
- Ran
bin/rails webpacker:compile