Skip to content
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

error while installing "npm i" to test the example #982

Closed
amirmatin opened this issue Jan 21, 2018 · 15 comments
Closed

error while installing "npm i" to test the example #982

amirmatin opened this issue Jan 21, 2018 · 15 comments

Comments

@amirmatin
Copy link

This problem has been mentioned before in in the issues section here
mapbox/mapbox-gl-js#5025

However I am still seeing this problem.. ..
To be clear I am getting the following error

npm ERR! addLocal Could not install D:\Map_folder\react-native-mapbox-gl-master\mapbox-react-native-mapbox-gl-6.0.2.tgz

Is there finally a solution for this ?

Thanks

@nitaliano
Copy link
Owner

What version of npm are you using? That error is saying that npm pack is failing

@amirmatin
Copy link
Author

@nitaliano So the error happens when I try to install npm in the example folder of mapbox-gl.
Basically I have downloaded react-native-mapbox-gl-master, unzip it, navigate to example folder and try to run npm i. this is where this error occure
thanks

@amirmatin
Copy link
Author

amirmatin commented Jan 22, 2018

@nitaliano I downgraded my RN to 0.49.5 and now getting a different error when i try npm i. please see log below

./scripts/npm_pack_rngl.sh

'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-native-mapbox-gl-demo@0.0.1 pack:gl: ./scripts/npm_pack_rngl.sh
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-native-mapbox-gl-demo@0.0.1 pack:gl script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\amira\AppData\Roaming\npm-cache_logs\2018-01-22T00_44_33_192Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-native-mapbox-gl-demo@0.0.1 preinstall: npm run pack:gl
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-native-mapbox-gl-demo@0.0.1 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@nitaliano
Copy link
Owner

What type of shell are you running npm install in? You need to make sure it's a bash shell and that you're on a newer version of npm

@amirmatin
Copy link
Author

@nitaliano Im on widows, visual studio code running "cmd"..

@GuillotJessica
Copy link

GuillotJessica commented Feb 5, 2018

@amirmatin never got it to work either on windows cause of one file missing in the gitignore, and some other windows particularities of windows versus linux file name if I recall, but no problem for the install on ubuntu, I didn't get android studio there to get any further. I love to see it on windows though, despite what you think of windows, I got no choice

@nitaliano
Copy link
Owner

I'm going to port the bash script over to node, so it will be easier to deal with cross platform OS issues

@amirmatin
Copy link
Author

@GuillotJessica An ugly hack to run this on windows is to compile the code first on a mac and then use that example project in windows ..
but even then I am only able to run the example code and so far I haven't been able to add this library to my project.. I am afraid there is a HUGE lack of documentation specially when it is a subscription based service ...

@nitaliano
Copy link
Owner

We have step by step instructions it's as simple as adding things to native config files

Android - https://github.com/mapbox/react-native-mapbox-gl/blob/master/android/install.md

iOS - https://github.com/mapbox/react-native-mapbox-gl/blob/master/ios/install.md

We also have a gitter chat setup if you want to ask me some or anyone else questions https://gitter.im/react-native-mapbox-gl

Would be happy to help get you setup

@TarasDumych
Copy link

TarasDumych commented Feb 26, 2018

@amirmatin Try to remove react-native-mapbox-gl from package.json. Then run npm i react-native-mapbox-gl --save && npm i

@amirmatin
Copy link
Author

@TarasDumych I got it to work removing the package and manually installing for Android. A problem that I have at the moment is when I use offline maps and close the application, the second time I try to open the app, it crashes then the next time opens fine ...

@nitaliano
Copy link
Owner

@amirmatin add textureMode as a prop to your mapview it should help prevent the crash, if you're using master

@Edison4mobile
Copy link

@TarasDumych Good. thanks

@deekshithmr95
Copy link

@TarasDumych im still facing that issue. Can you help please!

@systemlevel
Copy link

Hey guys this repo is no longer being maintained. Please come over to the one that is being actively supported by our community here: https://github.com/react-native-mapbox-gl/maps

emerson233 pushed a commit to studyroz/react-native-mapbox-gl that referenced this issue Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants