This problem has been mentioned before in in the issues section here
https://github.com/mapbox/mapbox-gl-js/issues/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
What version of npm are you using? That error is saying that npm pack is failing
@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
@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! [email protected] pack:gl: ./scripts/npm_pack_rngl.sh
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! [email protected] preinstall: npm run pack:gl
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
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
@nitaliano Im on widows, visual studio code running "cmd"..
@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
I'm going to port the bash script over to node, so it will be easier to deal with cross platform OS issues
@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 ...
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
@amirmatin Try to remove react-native-mapbox-gl from package.json. Then run npm i react-native-mapbox-gl --save && npm i
@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 ...
@amirmatin add textureMode as a prop to your mapview it should help prevent the crash, if you're using master
@TarasDumych Good. thanks
@TarasDumych im still facing that issue. Can you help please!
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
Most helpful comment
@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! [email protected] pack:gl:
./scripts/npm_pack_rngl.shnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! [email protected] preinstall:
npm run pack:glnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.