"Cannot resolve module babel-runtime/regenerator"
Created by: gaearon
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’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.)