Error using react-native cli after upgrading to v0.40.0-rc.*
See original GitHub issueDescription
Upgraded from v0.39.0 to v0.40.0-rc.1
When executing run-android
or upgrade
, the following output is displayed.
...\node_modules\babel-core\lib\transformation\file\index.js:600
throw err;
^
SyntaxError: .../node_modules/react-native/packager/react-packager/src/Bundler/index.js: Unexpected token, expected ) (42:8)
40 |
41 | export type GetTransformOptions<T> = (
> 42 | string,
| ^
43 | Object,
44 | string => Promise<Array<string>>,
45 | ) => T | Promise<T>;
at Parser.pp$5.raise (...\node_modules\babylon\lib\index.js:4215:13)
at Parser.pp.unexpected (...\node_modules\babylon\lib\index.js:1599:8)
at Parser.pp.expect (...\node_modules\babylon\lib\index.js:1587:33)
at Parser.pp$7.flowParsePrimaryType (...\node_modules\babylon\lib\index.js:4952:14)
at Parser.pp$7.flowParsePostfixType (...\node_modules\babylon\lib\index.js:5025:38)
at Parser.pp$7.flowParsePrefixType (...\node_modules\babylon\lib\index.js:5041:17)
at Parser.pp$7.flowParseIntersectionType (...\node_modules\babylon\lib\index.js:5047:19)
at Parser.pp$7.flowParseUnionType (...\node_modules\babylon\lib\index.js:5057:19)
at Parser.pp$7.flowParseType (...\node_modules\babylon\lib\index.js:5068:19)
at Parser.pp$7.flowParseTypeInitialiser (...\node_modules\babylon\lib\index.js:4393:19)
It is the first time I encountered this error. Downgrading back to 0.39.0 fixes this issue.
Additional Information
- React Native version: 0.40.0-rc.1
- Platform: Android. Not tested for iOS
- Operating System: Windows 10
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Upgrading to new versions - React Native
There's currently two ways for upgrading your React Native project: by using React Native CLI or manually with Upgrade Helper.
Read more >React Native version mismatch - Stack Overflow
I use rm -rf $TMPDIR/react-* to get rid of any cached builds. If that doesn't work, I try to build the app in...
Read more >Troubleshooting common React Native bugs - LogRocket Blog
This troubleshooting guide shares how to easily find and address common React Native bugs. See common error examples.
Read more >react-native - npm
React Native brings React's declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access ......
Read more >How to Fix a React Native Version Mismatch Quickly - Waldo
Version Mismatch Error in React Native · Creating a blank React Native project using either React Native CLI or Expo CLI · Starting...
Read more >
Top Related Medium Post
No results found
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 Free
Top 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
I had the same issue. Blowing away my node_modules and re-installing fixed it for me.
Running the following should fix it
npm install --save babylon