Mykyta  Stelmaschenko
Mykyta Stelmaschenko

Reputation: 121

Unhandled JS Exception: undefined is not an object (evaluating 'u.View.propTypes.style')

Making IOS build of React native for the first time:) Can't make release build to IOS. Debug build works. Only release and Testflight not working. App crashes ( closes) after it opens. I cleaned the cache, reinstall packages but still the same error occurs. Versions of react and react-native:

   "react": "16.2.0",
   "react-native": "0.53.3"

My error messages from console in Xcode:

[error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a 
registered callable module (calling runApplication)
2018-03-05 22:40:26.891072+0200 agMedica[713:91027] Module AppRegistry 
is not a registered callable module (calling runApplication)
2018-03-05 22:40:26.912175+0200 agMedica[713:91025] *** Terminating app 
due to uncaught exception 'RCTFatalException: Unhandled JS Exception: 
undefined is not an object (evaluating 'u.View.propTypes.style')', 
reason: 'Unhandled JS Exception: undefined is not an object (evaluating 
'u.View.prop..., stack:
<unknown>@649:1548
d@2:755
<unknown>@648:81
d@2:755
<unknown>@435:171
d@2:755
<unknown>@434:81
d@2:755
<unknown>@342:201
d@2:755
<unknown>@305:141
d@2:755
<unknown>@12:42
d@2:755
n@2:326
global code@870:8
'
*** First throw call stack:
(0x1d7bfb3d 0x1ca47067 0x1ce697 0x1cc1a9 0x1d7c4354 0x1d6e82b9 
0x1d6ebe87 0x1e0cb3 0x21e0c9 0x21dd3b 0x7ff467 0x80b66f 0x802a39 
0x80bb31 0x80d76b 0x80d471 0x1d04287d 0x1d04245c)
libc++abi.dylib: terminating with uncaught exception of type 
NSException

Upvotes: 2

Views: 4538

Answers (1)

Mykyta  Stelmaschenko
Mykyta Stelmaschenko

Reputation: 121

As was written View.propTypes has been deprecated. I have been trying to find this piece in my code. But couldn't. Than I look at node modules and found some of it. Change View.propTypes.style to PropTypes.style and it started to work. Maybe this solution help to someone too, maybe someone knows better solution. View.propTypes.style code that need to change

Upvotes: 3

Related Questions