-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Cannot resolve module babel-runtime/regenerator" #255
Comments
I just ran into something similar when using react-input-enhancements, adding |
You could try using |
This works as an interim solution but I don’t like that it makes us more tied to Webpack resolution mechanism. I would we solve this in a more generic way. |
You can solve this by bundling up all the polyfill-style dependencies (including the current You have the same "exposes users" and "version control" issues with the current polyfill dependencies anyway. |
Not sure I fully understand what you propose, can you elaborate? |
I’ll plug the hole for now with #262 but this is suboptimal (e.g. probably won’t work with Jest). |
This enables us to ship them now, and find a way to resolve runtime path without webpack later. See #255
This enables us to ship them now, and find a way to resolve runtime path without webpack later. See #255
Can this also be resolved by not shipping |
I'm not saying "drop |
So that’s why they end up there even with npm 3, you’re right. |
A PR to unbundle ESLint plugins and |
Ah, this won't work – at least, it won't work in a straightforward way. It looks like Well, anyway it worked for the ESLint plugins, but not And |
Though – anybody else looking at this, don't take that as gospel. Very likely I just messed up. |
For anyone googling this error when trying to run Jest tests on generators (as @gaearon pointed out it the fix in #262 does not seem to work in Jest), looking for the workaround: I fixed this by putting babel-runtime in my app dependencies. This fixed the issue. |
babel/babel#3612 is released in v6.15.0 of babel-plugin-transform-runtime
|
This makes generators work with Jest. Fixes facebook#255. Replaces facebook#262.
This makes generators work with Jest. Fixes facebook#255. Replaces facebook#262.
Sorry for bumping old issue here... Recently, out of nowhere, I started having issues with missing
Adding |
Please file a new issue with details. |
Move to #1421 |
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:
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.)babel-plugin-transform-runtime
that would let us setruntimeModuleName
to a resolved path. (I would prefer this.)The text was updated successfully, but these errors were encountered: