Broken in react-native@0.57.0-rc.3
See original GitHub issueI’m aware that I’m a bit early here but I just wanted to let you know or ask if the transformer might be broken in the newest version of react-native ?
SyntaxError: /testproject/src/components/Test.tsx: Unexpected token, expected ")" (37:30)
35 |
36 | interface SectionProps {
> 37 | content: (({ i, isActive }: { i: number, isActive: boolean }) => React.ReactElement<any>) | string;
| ^
38 | label: string;
39 | info: string | number;
40 | direction?: 'row' | 'column';
SyntaxError: /testproject/src/components/Test.tsx: Unexpected token, expected ")" (37:30)
35 |
36 | interface SectionProps {
> 37 | content: (({ i, isActive }: { i: number, isActive: boolean }) => React.ReactElement<any>) | string;
| ^
38 | label: string;
39 | info: string | number;
40 | direction?: 'row' | 'column';
at _class.raise (/testproject/node_modules/@babel/parser/lib/index.js:3906:15)
at _class.unexpected (/testproject/node_modules/@babel/parser/lib/index.js:5235:16)
at _class.expect (/testproject/node_modules/@babel/parser/lib/index.js:5223:28)
at _class.tsParseParenthesizedType (/testproject/node_modules/@babel/parser/lib/index.js:8943:12)
at _class.tsParseNonArrayType (/testproject/node_modules/@babel/parser/lib/index.js:9043:23)
at _class.tsParseArrayTypeOrHigher (/testproject/node_modules/@babel/parser/lib/index.js:9050:23)
at _class.tsParseTypeOperatorOrHigher (/testproject/node_modules/@babel/parser/lib/index.js:9094:122)
at _class.tsParseUnionOrIntersectionType (/testproject/node_modules/@babel/parser/lib/index.js:9099:18)
at _class.tsParseIntersectionTypeOrHigher (/testproject/node_modules/@babel/parser/lib/index.js:9117:19)
at _class.tsParseUnionOrIntersectionType (/testproject/node_modules/@babel/parser/lib/index.js:9099:18)
I’m getting this error which lets me think that babel is trying to transform the code before the typescript transformer jumps in.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:12
Top Results From Across the Web
React native run-ios 0.57.x is broken #21741 - GitHub
I was able to fix a few issues by using "legacy build mode" in XCode 10 (see File -> Workspace Settings -> Build...
Read more >Upgrading to new versions - React Native
Upgrading to new versions of React Native will give you access to more APIs, views, developer tools and other goodies.
Read more >React native version updating not working - Stack Overflow
I tried to update my "React-native" version to 0.59.0 from 0.57.8, but it is not updating. react-native upgrade 0.59.0-rc.0 this command is ...
Read more >Accessibility - React
Web accessibility (also referred to as a11y) is the design and creation of websites that can be used by everyone. Accessibility support is...
Read more >Version History - ReactXP
A new version of ReactXP will be released periodically following the same general update timeline of React Native. Each new version will get...
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 FreeTop 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
Top GitHub Comments
For people that still want to use this module, solution is simple. In file
rn-cli.config.js
remove keysgetTransformModulePath
andgetSourceExts
, and add section:For documentation, see https://facebook.github.io/metro/docs/en/configuration
Since the version 0.43.3, Metro has native support for Typescript by Babel 7.0.0 Plugin. See Add TypeScript support to React Native and #209 The react-native 0.57-rc3 comes with Metro 0.43.6 I don’t know how it can afect this package.