question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Cannot resolve module babel-runtime/regenerator"

See original GitHub issue

I get this message when I use generators because babel-runtime is not a runtime dependency of the generated project. I didn’t notice this when I merged #238 because I tested only the local flow (npm run create-react-app).

I see three possible solutions:

  • Document this as a known gotcha in the howto. (People using generators would probably find it quick enough.)
  • Put babel-runtime into everyone’s dependencies on project creation regardless of whether they actually use generators. (Not very good, we have no control over the version, and this exposes Babel to users which we’d rather avoid.)
  • Add an option to babel-plugin-transform-runtime that would let us set runtimeModuleName to a resolved path. (I would prefer this.)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
scholtzmcommented, Jan 18, 2017

Sorry for bumping old issue here…

Recently, out of nowhere, I started having issues with missing babel-runtime:

Adding babel-runtime to my dependencies fixes this issue but I’m not sure if this is the right way to go about it?

1reaction
hzoocommented, Sep 1, 2016

https://github.com/babel/babel/pull/3612 is released in v6.15.0 of babel-plugin-transform-runtime

npm view babel-plugin-transform-runtime dist-tags

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module 'babel-runtime/regenerator' Import locally ...
At first, I got the common issue of: ReferenceError: regeneratorRuntime is not defined . I, therefore, installed babel-plugin-transform-runtime ...
Read more >
Error: Can't resolve 'babel-runtime/regenerator' · Issue #310 ...
I'm facing build error propably due to babel versions conflict. This is output from Webpack: ERROR in ./node_modules/pdfjs-dist/lib/web/ui_utils ...
Read more >
Module not found: Can't resolve @babel/runtime/helpers
To solve the error "Module not found: Error: Can't resolve '@babel/runtime/helpers'", make sure to install the @babel/runtime package by opening your terminal ...
Read more >
babel-runtime-regenerator - npm
Start using babel-runtime-regenerator in your project by running `npm i ... other projects in the npm registry using babel-runtime-regenerator.
Read more >
Cannot find module 'babel-runtime/regenerator' Import locally ...
[Solved]-Cannot find module 'babel-runtime/regenerator' Import locally vs Import from NPM-babel.js · the transform plugin babel-plugin-transform-runtime (which ...
Read more >

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found