-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
TransformError Cannot read property 'throwIfClosureRequired' of undefined #18969
Comments
Thanks for posting this! It looks like your issue may be missing some necessary information. Can you run Thank you for your contributions. |
Got the same issue. Just cloned a fresh repo, and tried to run it got the same message. Packages: (wanted => installed) |
And I have the same problem. My react-native info: Packages: (wanted => installed) |
same problem here.. below I attached the react-native info.. Packages: (wanted => installed) |
duplicate of #18962 |
am also having the same problem any solution to this ? OS: Linux 4.14 Packages: (wanted => installed) |
Same problem here... |
Here too, however, it is surprisingly striking to see the same issue of these already occurring with others two hours ago. It's almost "At Live". |
Downgraded this and solves |
Just edit the packages.json file and set the version to 4.0.0 |
I ran into the same issue, downgrading to "babel-preset-react-native": "4.0.0" in the package.json and running npm install afterwards resolves the issue |
I use react-native init xxxx --version 0.44 |
@mruhnau I'm still getting the same error :(
|
Environment:
OS: macOS High Sierra 10.13.4
Node: 9.11.1
Yarn: 1.6.0
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: Not Found Same issue. Tried to downgrade |
@yankouskia I got the solution! thanks @marksturm. try this on your terminal:
you must use --force for the
|
downgrade of babel-preset-react-native worked for me.
|
Same here with babel-preset-react-native 5.0, downgrading did solve this issue. |
Downgrade version of babel-preset-react-native worked for me. Thanks. |
I am facing same issue. I tried it with changing version but it did not work. Below is my package.json |
@mverma89 Your error is not related to what's in this issue. Something wrong with your environment. Try doing "yarn start" (our exp start, in the case of Expo) to start the development server. Or evaluate your simulator's situation. There is some communication problem between the simulator and your terminal. PS: Reading this error again, I think was a bit wrong. But I think I could be a "cache" issue. mverma89 says it solves with some ADB issue, but I really think it's no that case. It's cache and the "clean-install" should solve his error. Just a theory. For those who come to read this in the future. |
Add this to your scrips: |
@MichelDiz Thanks for response. |
Sorry, change yarn to "npm install" - or install Yarn in your machine https://yarnpkg.com/lang/en/docs/install/#mac-stable |
@mverma89 When you modifiy dependencies in package.json you have to delete your node_modules folder and make a |
@MichelDiz @dengue8830 Thank you very much for support. I found the actual issue (adb not found). |
my node version is v8.11.1
npm version 5.8.0
my package.json content :
{
"name": "FirstRn2",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "^16.3.1",
"react-native": "0.55.3"
},
"devDependencies": {
"babel-jest": "22.4.3",
"babel-plugin-transform-es2015-block-scoping": "^6.26.0",
"babel-preset-react-native": "5.0.0",
"jest": "22.4.3",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
}
}
when I run : react-native run-android I get this:
{"type":"TransformError","lineNumber":0,"errors":[{"description":"/Users/wangpeng/Desktop/testRN/FirstRn3/index.js: Cannot read property 'throwIfClosureRequired' of undefined (While processing preset: "/Users/wangpeng/Desktop/testRN/FirstRn3/node_modules/babel-preset-react-native/index.js")","lineNumber":0}],"name":"SyntaxError","message":"/Users/wangpeng/Desktop/testRN/FirstRn3/index.js: Cannot read property 'throwIfClosureRequired' of undefined (While processing preset: "/Users/wangpeng/Desktop/testRN/FirstRn3/node_modules/babel-preset-react-native/index.js")","stack":"TypeError: Cannot read property 'throwIfClosureRequired' of undefined (While processing preset: "/Users/wangpeng/Desktop/testRN/FirstRn3/node_modules/babel-preset-react-native/index.js")\n at _default (/Users/wangpeng/Desktop/testRN/FirstRn3/node_modules/babel-preset-react-native/node_modules/@babel/plugin-transform-block-scoping/lib/index.js:19:36)\n at Function.memoisePluginContainer (/Users/wangpeng/Desktop/testRN/FirstRn3/node_modules/babel-core/lib/transformation/file/options/option-manager.js:113:13)\n at Function.normalisePlugin (/Users/wangpeng/Desktop/testRN/FirstRn3/node_modules/babel-core/lib/transformation/file/options/option-manager.js:146:32)\n at /Users/wangpeng/Desktop/testRN/FirstRn3/node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30\n at Array.map ()\n at Function.normalisePlugins (/Users/wangpeng/Desktop/testRN/FirstRn3/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)\n at OptionManager.mergeOptions (/Users/wangpeng/Desktop/testRN/FirstRn3/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)\n at /Users/wangpeng/Desktop/testRN/FirstRn3/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14\n at /Users/wangpeng/Desktop/testRN/FirstRn3/node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22"}
I really hope someone can help me, thanks very very much!!!!!!!
Environment
Steps to Reproduce
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: