response error code: 500
react-native, react and native-base version
0.46.0 15 2.2.0 windows10 Android
Expected behaviour
Actual behaviour
when I install it via npm install native-base then react-native link
and react-native run-android then react-native start
The development server returned response error code: 500
URL: http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false
Body:
{"from":"C:\\Users\\user\\ex\\node_modules\\native-base\\dist\\src\\Utils\\computeProps.js","to":"react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry","message":"Unable to resolve module `react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry` from `C:\\Users\\user\\ex\\node_modules\\native-base\\dist\\src\\Utils\\computeProps.js`: Module does not exist in the module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches: `watchman watch-del-all`.\n 2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.\n 3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`.","name":"UnableToResolveError","type":"UnableToResolveError","errors":[{}]}
processBundleResult
BundleDownloader.java:172
access$100
BundleDownloader.java:38
execute
BundleDownloader.java:108
emitChunk
MultipartStreamReader.java:69
readAllParts
MultipartStreamReader.java:116
onResponse
BundleDownloader.java:96
execute
RealCall.java:135
run
NamedRunnable.java:32
runWorker
ThreadPoolExecutor.java:1162
run
ThreadPoolExecutor.java:636
run
Thread.java:764
The full error shows in the packager:
Loading dependency graph, done.
Bundling 'index.android.js' 97.1(609/618), failed.
error: bundling failed: "Unable to resolve module 'react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry' from '/Users/me/projects/appname/node_modules/native-base/dist/src/Utils/computeProps.js': Module does not exist in the module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches...
RN: 0.46.0 Native Base: Both 2.1.4 and 2.2.0 Using OSX
For a temporary solution while waiting for official fix, you can edit the file: node_modules\native-base\dist\src\Utils\computeProps.js, replace:
react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry
WITH
react-native/Libraries/Renderer/shims/ReactNativePropRegistry
Same issue https://github.com/GeekyAnts/react-native-easy-grid
I can finally git rid this error by doing this
replace react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry
with react-native/Libraries/Renderer/shims/ReactNativePropRegistry
on node_modules\native-base\dist\src\Utils\computeProps.js
and node_modules\react-native-easy-grid\Utils\computeProps.js
Thanks to @deathemperor and @ajostergaard
@novalagung solution It also worked in my case.
@novalagung Thanks it worked .
We've published a fix with version 2.2.1. Can anyone confirm that it's working so that the issue can be closed.
@sankhadeeproy007 I still get this error with NativeBase 2.2.1, using react-native 0.45.1 with Expo in iOS
EDIT: I saw that 2.2.1 is for react-native 0.46, and reverting to 2.2.0 fixed the issue for me. Maybe the new version got installed somehow when doing a clean install with yarn
@cosmocoder This issue is for rn 0.46. For 0.45, use v2.2.0.
Fixed with version 2.2.1.
I'm still getting the issue.
native-base: 2.2.1 react-native: 0.46.2. Windows 10.
Any help would be appreciated.
Please use below if issue persist replace react-native/Libraries/Renderer/shims/ReactNativePropRegistry with react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry
on node_modules\native-base\dist\src\Utils\computeProps.js and node_modules\react-native-easy-grid\Utils\computeProps.js