SceneComponent.js: Rest element must be last element
macthorman opened this issue · comments
I followed these steps:
- execute "npm install" in the "/Example" directory
- try "react-nativ run-android" ==> Not working, it requests to upgrade first
- I run "react-native upgrade"
- I run "react-nativ run-android" again and it pushes the app to my android phone, but on the phone I see this error message:
`error: bundling failed: SyntaxError: C:\Users\t.stanzl\Desktop\Raksha\ReactNative\tuya5\tuyasmart-home-sdk-react-native-master\Example\node_modules\react-native-scrollable-tab-view\SceneComponent.js: Rest element must be last element (9:32)
7 |
8 | const SceneComponent = (Props) => {
9 | const {shouldUpdated, ...props, } = Props;
| ^
10 | return <View {...props}>
11 |
12 | {props.children}
at Object.raise (C:\Users\t.stanzl\Desktop\Raksha\ReactNative\tuya5\tuyasmart-home-sdk-react-native-master\Example\node_modules@babel\parser\lib\index.js:6322:17)
at Object.raiseRestNotLast (C:\Users\t.stanzl\Desktop\Raksha\ReactNative\tuya5\tuyasmart-home-sdk-react-native-master\Example\node_modules@babel\parser\lib\index.js:8077:10)
at Object.checkCommaAfterRest (C:\Users\t.stanzl\Desktop\Raksha\ReactNative\tuya5\tuyasmart-home-sdk-react-native-master\Example\node_modules@babel\parser\lib\index.js:8066:12)
at Object.parseObjectMember (C:\Users\t.stanzl\Desktop\Raksha\ReactNative\tuya5\tuyasmart-home-sdk-react-native-master\Example\node_modules@babel\parser\lib\index.js:9154:14)
at Object.parseObj (C:\Users\t.stanzl\Desktop\Raksha\ReactNative\tuya5\tuyasmart-home-sdk-react-native-master\Example\node_modules@babel\parser\lib\index.js:9112:25)
at Object.parseBindingAtom (C:\Users\t.stanzl\Desktop\Raksha\ReactNative\tuya5\tuyasmart-home-sdk-react-native-master\Example\node_modules@babel\parser\lib\index.js:7917:21)
at Object.parseVarId (C:\Users\t.stanzl\Desktop\Raksha\ReactNative\tuya5\tuyasmart-home-sdk-react-native-master\Example\node_modules@babel\parser\lib\index.js:10440:20)
at Object.parseVarId (C:\Users\t.stanzl\Desktop\Raksha\ReactNative\tuya5\tuyasmart-home-sdk-react-native-master\Example\node_modules@babel\parser\lib\index.js:2596:11)
at Object.parseVar (C:\Users\t.stanzl\Desktop\Raksha\ReactNative\tuya5\tuyasmart-home-sdk-react-native-master\Example\node_modules@babel\parser\lib\index.js:10412:12)
at Object.parseVarStatement (C:\Users\t.stanzl\Desktop\Raksha\ReactNative\tuya5\tuyasmart-home-sdk-react-native-master\Example\node_modules@babel\parser\lib\index.js:10234:10)`
npm install react-native-scrollable-tab-view@0.10.0
will fix this issue.
I think @hughcoder shoud update package.json