Reputation: 108
I created a React Native project with Expo using expo init MapTry
. I am currently trying to install MapBox library into it. For some reason I get an error at the first step after trying to install it. I followed this guide of installation: https://github.com/rnmapbox/maps#Installation but for some reason I am getting an error message when I try to run npm install rnmapbox/maps#main --save
from the terminal. The error says the following:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent An unknown git error occurred
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
I also tried to search for it in the official NPM site and found this one: https://www.npmjs.com/package/@rnmapbox/maps . After running the following code: npm i @rnmapbox/maps
which was written there, I get the same error message as written above. What should I do? How can I use MapBox library in React Native?
Upvotes: 0
Views: 1166
Reputation: 497
try to run this command in your terminal
with NPM
npm install @rnmapbox/maps --save
with YARN
yarn add @rnmapbox/maps
Upvotes: 0