Open ghorbani-m opened 4 years ago
@ghorbani-m I tried decoupling the projects an failed. Will try again in the weekend.
I am having this error also. It is when I upgraded my RN version from 0.59.9 to 0.61.5
I installed https://www.npmjs.com/package/patch-package.
I tried to edit the file to a working one. Then, run the command yarn patch-package react-native-common
. It works.
I am having the same error on latest react-native version
SyntaxError: /node_modules/react-native-general-calendars/node_modules/react-native-common/src/components/SegmentedControl.js: Unexpected reserved type string (20:30)
18 | static propTypes: {
19 | values: PropTypes.array,
> 20 | selectionColor: PropTypes.string,
| ^
21 | selectedIndex: PropTypes.number,
22 | onChange: PropTypes.func,
23 | titleStyle: PropTypes.any,
RCTFatal
__28-[RCTCxxBridge handleError:]_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_callback_4CF
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
UIApplicationMain
main
start
0x0
same issue any progress here?
I installed https://www.npmjs.com/package/patch-package. I tried to edit the file to a working one. Then, run the command
yarn patch-package react-native-common
. It works.
tried this .... nothing changes am i missing something?
its urgent for me
@rghorbani
reza jooon ;)
your packege is great
can you just make it work again?
دم شما گرم
1- in vscode open /node_modules/react-native-common/src/components/SegmentedControl.js 2- In class SegmentedControl delete the following lines
static propTypes: {
values: PropTypes.array,
selectionColor: PropTypes.string,
selectedIndex: PropTypes.number,
onChange: PropTypes.func,
titleStyle: PropTypes.any,
segmentStyle: PropTypes.any,
style: ViewPropTypes.style,
};
3- In class Segment delete the following lines
props: {
value: string;
isSelected: boolean;
selectionColor: string;
segmentStyle?: any;
titleStyle?: any;
onPress: () => void;
};
4- build your project
yarn build
5- Remember to redo this process every time running 'yarn install' or 'npm install' Or use https://www.npmjs.com/package/patch-package
Same issue. Editing node_modules file is NOT a good option
Also having this problem, with React version: 17.0.1.
Getting the following error:
Unexpected reserved type string (7:13)
const formSchema = Yup.object().shape(schema:{
email: Yup.string().required().email(),
^
password: Yup.string().required()
});
has anybody been able to solve this yet?
i'm also having same issue
AuthSignUpContainer.js:
error: bundling failed: SyntaxError: Unexpected reserved type any. (14:31)
13 | type Props = {
14 | AuthSignUpReducer: PropTypes.any, | ^ 15 | authSignUpReset: PropTypes.func, 16 | authSignUpDismissMessages: PropTypes.func, 17 | };
can anyone help me!
I upgraded to react-native 0.59.10 but bundling is failed:
`react-native-common\src\components\SegmentedControl.js: Unexpected reserved type string (20:30)
18 | static propTypes: { 19 | values: PropTypes.array,