"Cannot resolve module babel-runtime/regenerator"
See original GitHub issueI 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’sdependencies
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 setruntimeModuleName
to a resolved path. (I would prefer this.)
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (9 by maintainers)
Top 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 >Top Related Medium Post
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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?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