NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

response error code: 500

Open EasonWang01 opened this issue 9 years ago • 12 comments

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

EasonWang01 avatar Jul 07 '17 10:07 EasonWang01

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

chromakey avatar Jul 07 '17 14:07 chromakey

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

deathemperor avatar Jul 08 '17 05:07 deathemperor

Same issue https://github.com/GeekyAnts/react-native-easy-grid

ajostergaard avatar Jul 08 '17 08:07 ajostergaard

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 avatar Jul 08 '17 10:07 novalagung

@novalagung solution It also worked in my case.

alejandro-2awesome avatar Jul 08 '17 12:07 alejandro-2awesome

@novalagung Thanks it worked .

tamal-appsbee avatar Jul 08 '17 15:07 tamal-appsbee

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 avatar Jul 09 '17 06:07 sankhadeeproy007

@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 avatar Jul 09 '17 15:07 cosmocoder

@cosmocoder This issue is for rn 0.46. For 0.45, use v2.2.0.

sankhadeeproy007 avatar Jul 09 '17 15:07 sankhadeeproy007

Fixed with version 2.2.1.

EasonWang01 avatar Jul 10 '17 01:07 EasonWang01

I'm still getting the issue.

native-base: 2.2.1 react-native: 0.46.2. Windows 10.

Any help would be appreciated.

Pluue avatar Jul 13 '17 07:07 Pluue

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

wageeshwara avatar Aug 13 '17 16:08 wageeshwara