emberjs / ember-cli-babel

Ember CLI plugin for Babel
MIT License
153 stars 119 forks source link

`Could not find module '@babel/runtime/helpers/esm/regeneratorRuntime'` in a fresh new app #445

Open boris-petrov opened 2 years ago

boris-petrov commented 2 years ago

Run ember new --yarn ember-cli-babel-bug. Then modify config/targets.js to be just ['firefox 35']. To ember-cli-build.js add:

'ember-cli-babel': {
  includeExternalHelpers: true,
  includePolyfill: true,
},

Run the app with ember serve and watch it blow in a browser.

A few things to note - using npm instead of yarn fixes the issue. Downgrading all @babel packages to 7.17.x also fixes the issue. I think this is somewhat related.

boris-petrov commented 2 years ago

@nicolo-ribaudo - I'm pinging you directly here because you seem to be the one who's implemented the PR (and also has been answering in a couple of issues related to this one in the Babel repo). If you're unfamiliar with Ember, npm install -g ember-cli should allow you to run the ember new and ember serve commands I've written above and the value in ember-cli-build.js should go in the hash in new EmberApp.