react-native: [0.46] ReferenceError: Unknown plugin "transform-runtime"
Is this a bug report?
Yes
Have you read the Bugs section of the Contributing to React Native Guide?
Yes
Environment
react-native -v: react-native-cli: 2.0.1 react-native: 0.46.0node -v: v7.6.0npm -v: 5.0.3yarn --version(if you use Yarn): 0.24.6
Then, specify:
- Target Platform (e.g. iOS, Android): iOS
- Development Operating System (e.g. macOS Sierra, Windows 10): macOS
- Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant):
Steps to Reproduce
(Write your steps here:)
react-native inityarnreact-native run-ios
Expected Behavior
Open iOS simulator with the hello world app
Actual Behavior
Packager fails
/Users/xx/test/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328
throw e;
^
ReferenceError: Unknown plugin "transform-runtime" specified in "/Users/xx/test/node_modules/regenerator-transform/package.json" at 0, attempted to resolve relative to "/Users/xx/test/node_modules/regenerator-transform" (While processing preset: "/Users/xx/test/node_modules/babel-preset-react-native/index.js")
at /Users/xx/test/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
at Array.map (native)
at Function.normalisePlugins (/Users/xx/test/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (/Users/xx/test/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
at OptionManager.init (/Users/xx/test/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at compile (/Users/xx/test/node_modules/babel-register/lib/node.js:103:45)
at loader (/Users/xx/test/node_modules/babel-register/lib/node.js:144:14)
at Object.require.extensions.(anonymous function) [as .js] (/Users/xx/test/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
Process terminated. Press <enter> to close the window
Reproducible Demo
init a new project
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 44
- Comments: 35 (3 by maintainers)
Doing this :
rm -rf .babelrcsolves the issue temporarily
Manual
react-native startworks for me too after building everything else, as a workaround.But the usual and complete
react-native run-iosworkflow is busted and still need fixing, obviously. The other workarounds posted previously (with .babelrc and such) doesn’t work for me.This is happening on an existing project I just upgraded to 0.46.
I got it working by deleting
.babelrcas per @javierM84Closing the terminated process and booting up the packager via
react-native startseems to workI have the exact same issue when running run-android, while run-ios is working fine.
The problem occurs on newly generated projects, my existing projects run fine.
I also have the same issue. This is a temporary fix because I changed previous react-native package.json.
node_modulespackage.jsonnpm installreact-native run-iosNo need for manual install or deletes. With yarn, all you need is
yarn upgrade. https://github.com/facebook/react-native/issues/14530#issuecomment-313747461@javierM84 thanks it works for me on RN 0.46