React-native-mapbox-gl: npm install errors

Created on 21 Apr 2019  路  3Comments  路  Source: nitaliano/react-native-mapbox-gl

When I try to run npm install @mapbox/react-native-mapbox-gl --save, the following happens.

> @mapbox/[email protected] preinstall /Users/tyleryouschak/Code/livestormchasing-mobile/node_modules/@mapbox/react-native-mapbox-gl
> npm run fetch:ios:sdk


> @mapbox/[email protected] fetch:ios:sdk /Users/tyleryouschak/Code/livestormchasing-mobile/node_modules/@mapbox/react-native-mapbox-gl
> node ./scripts/download-mapbox-gl-native-ios-if-on-mac.js 3.7.8

{ Error: Command failed: "/Users/tyleryouschak/Code/livestormchasing-mobile/node_modules/@mapbox/react-native-mapbox-gl/scripts/download-mapbox-gl-native-ios.sh" 3.7.8
Print: Entry, ":MGLSemanticVersionString", Does Not Exist
internal/modules/cjs/loader.js:611
    throw err;
    ^

Error: Cannot find module '../'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:609:15)
    at Function.Module._load (internal/modules/cjs/loader.js:535:25)
    at Module.require (internal/modules/cjs/loader.js:663:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/tyleryouschak/Code/livestormchasing-mobile/node_modules/.bin/which:2:13)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)

    at ChildProcess.exithandler (child_process.js:297:12)
    at ChildProcess.emit (events.js:197:13)
    at maybeClose (internal/child_process.js:978:16)
    at Socket.stream.socket.on (internal/child_process.js:395:11)
    at Socket.emit (events.js:197:13)
    at Pipe._handle.close (net.js:611:12)
  killed: false,
  code: 1,
  signal: null,
  cmd:
   '"/Users/tyleryouschak/Code/livestormchasing-mobile/node_modules/@mapbox/react-native-mapbox-gl/scripts/download-mapbox-gl-native-ios.sh" 3.7.8' }
npm WARN [email protected] requires a peer of react-art@>= 16.3.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@>= 16.3.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-native-web@>= 0.7 but none is installed. You must install peer dependencies yourself.

+ @mapbox/[email protected]
added 3 packages from 7 contributors and audited 890836 packages in 9.361s
found 11 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

I'm unsure what to do.

All 3 comments

Got the same error here as well :(

I ended up here because I've been having the same issue

At first, I was downloading the @mapbox/react-native-mapbox-gl from the official NPM package of Mapbox. Last time the package has been updated was 8 months ago. Unfortunately, it seems like Mapbox stopped supporting it!

To solve my issue I switched to downloading the package directly from the up-to-date "An unofficial" Github repo. Updated my package.json to this:

"@mapbox/react-native-mapbox-gl": "https://github.com/nitaliano/react-native-mapbox-gl"

There are other posts discussing using CocoaPods #1533 and S3 slow download issue #916

@bilal-korir even if I switch to this repo, I have a extremely slow downloading... Don't know why

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olofd picture olofd  路  3Comments

max-prokopenko picture max-prokopenko  路  4Comments

digitaldavenyc picture digitaldavenyc  路  4Comments

VentsislavDinev picture VentsislavDinev  路  3Comments

EugenePisotsky picture EugenePisotsky  路  4Comments