-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Requiring unknown module "undefined". #2051
Comments
Solved the issue by changing dependencies in package.json manually:
Changed to
Then ran npm install. |
I have same issue. https://github.com/react-community/react-native-maps/blob/master/index.js#L12 |
Your fix worked for me. To all, just make sure the package.json specifies EDIT: the install only works with yarn |
I got the same error, upgrading to 0.54.0-rc.3 worked. |
fix module undefined bug in react-native@0.54.0 (#2051)
I sent PR to solve this and it was merged. |
npm uninstall react-native-maps |
@altissave1 The aim of this issue is to make RNMaps@0.20.1 compatible with RN@0.54.0 |
waiting for release too |
@Tamiyadd try to install the master from git and let us know if it works |
@rborn it works! |
@AzarouAmine I used the given steps but same error every time. "dependencies": { "dependencies": { after this I run the npm install |
I'm facing the same issue for past few days as @jamesDZ . It would be really helpful if someone can provide insight on what could be happening on either react native or react native maps side. |
@jamesDZ @rishabhmathur1693 The only fix for the moment is this Make sure of this point too Now you can only wait for the next release like everyone |
@VinceBT Thanks for your response, but I didn't helped me much. After changing react-native to 0.54.0-rc.3, NPM gave me this error - Then, I looked up for this issue and I found its resolution on this link - https://github.com/facebook/react-native/issues/18010 After changing react-native version to 0.54.0-rc.4, my package.json looks like this -
Then, I executed the command When the service is started, I ran Please point out if I had done something wrong or should've done something else. |
|
FYI: I wrote the document to solve this issue until it will be released. |
@rishabhmathur1693 You wont have the babylon error if you install it with yarn |
I faced this issue too and this is my experience and eventual temp solution. Before i start, i would like to point out that before I even reached this error of 'unknown module "undefined"', i was following the documentation and realized i need to need to comment out "BatchedBridge" from the Podfile to do pod install. After pod install and following further into the document, i encounter 'unknown module "undefined"' when trying to run it on IOS. So following the suggested solution on this page, i encountered the following:
2 Using "react-native": "0.54.0-rc.4" can overcome the "EUNSUPPORTED ISSUE protocol" but still result in 'unknown module "undefined"'.
So the temporarily fix for me is to use version "react-native": "^0.52.3". Specifically i did the following: |
@sydneywu Thanks for your solution. I did everything that you mentioned, but still I got this error while building - So, I added After doing all that my package. json looks like this -
I ran I looked up a solution and added style to MapView -
Still nothing. Could it be due to the reduced version of react that we are using? |
@rishabhmathur1693 @sydneywu As said in #2051 (comment) you wont have the unsupported protocol error if you install 0.54.0-rc.3 with yarn. Stop trying black magic tricks, try it and tell us if it works. npm i -g yarn
yarn add react-native@0.54.0-rc.3 |
@christopherdro Could there be a release after this PR ? |
Thanks @VinceBT @sydneywu and @rishabhmathur1693 with your effort issue resolved. |
i fixed this issue with react-native-maps
if you have still problem with this you can use @maikenmadsen92 way
hope this help you |
The code here fixed this for me |
can we plan a new release? |
@hrl7 's solution works for our project too. |
hi, i get red error undifined, this is my configuration: |
@xxstefanoxx change |
@wbattel4607 I have to give back the command npm install? |
@xxstefanoxx after changing the version in |
@wbattel4607 thanks!!! now works with emulatore but xcode give this error: |
@xxstefanoxx see proposed solutions in this issue #2066 |
This is still holding us up. We've tried using the fix on master but #2066 is preventing us from doing so. @rborn @hrl7 when will a new version be released? There are a ton of changes on master but the last version was released 40 days ago. We're stuck into a corner right now. React Native 0.53 has a debugging issue that prevents us from using it and we can't get react-native-maps working on 0.54 at all. |
@wbattel4607 I don't control the releases sadly :( |
Hey there. Right now I am pretty backed up with work so what is mainly limiting me from doing a release is putting the release notes together. If someone from the community can create the release commit as a PR I'll be more than happy to merge and do a release. Here is a reference commit to what needs to be changed for a new release. |
It is written in the comments above already, but because there is so much activity here it may get lost. Until the new release is out this solves the issue package.json The install only works with |
The master version works fine (for me). Whats holding back a new release? |
@jerolimov this: #2051 (comment) I don't have enough time to do it these days but we can accept a PR 🤪 |
- react-native-maps Google Maps component - react-native Needs downgrade to 0.54.0-rc3, to prevent errors with react-native-maps react-native-maps/react-native-maps#2051 - pods Ref #7
I guess I'll make a PR then... ¯\(ツ)/¯ Edit: done! See here. |
So there was an update for react, react-native and react-native-maps, the configuration that is currently working for me is:
Also I added additional things to make project work your-project/android/build.gradle
I used the old way of implementation (not the recommended project-wide properties) your-project/android/app/build.gradle
and the last thing I changed is your-project/android/gradle/wrapper/gradle-wrapper.properties
Hope this helps, cheers! 👍 |
@Arshiamidos thanks bro, now works 💃 |
@herarya ur welcome bro🤗. |
the error is fixed, but after that this ih just showing a white blank screen , somebody know how to fix it ? |
@mcandrak you have to give style to map.. give it absolute position of top, bottom, left and right to 0 |
I got the same error ,but finally I fix it by changed a path of a required image |
Is this a bug report?
Yes
Have you read the Installation Instructions?
Yes, repeated the steps 3 times with different projects. Same result.
Environment
Actual Behavior
The MapView import doesn't recognize "react-native-maps" as a module.
Screenshot
The text was updated successfully, but these errors were encountered: