Platform: Node.js/Ubuntu
Mapbox SDK version: 5.0.2
npm install @mapbox/mapbox-gl-native on a directory initialized with npm initInstall would succeed without issues.
Nasty error comes up. Binary file has a 403 error on S3 for some reason. Nothing seems to work and I don't know why it would be 403 in the first place. This error happens regardless if the package is installed from the GitHub release or npm.
```sh
@mapbox/[email protected] install /home/cyberscape/ccr/node_modules/@mapbox/mapbox-gl-native
node-pre-gyp install --fallback-to-build=false
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/@mapbox/mapbox-gl-native/v5.0.2/node-v72-linux-x64-Release.tar.gz
node-pre-gyp ERR! stack at PassThrough.
node-pre-gyp ERR! stack at PassThrough.emit (events.js:214:15)
node-pre-gyp ERR! stack at ClientRequest.
node-pre-gyp ERR! stack at Object.onceWrapper (events.js:297:20)
node-pre-gyp ERR! stack at ClientRequest.emit (events.js:209:13)
node-pre-gyp ERR! stack at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:582:27)
node-pre-gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:115:17)
node-pre-gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:456:22)
node-pre-gyp ERR! stack at TLSSocket.emit (events.js:209:13)
node-pre-gyp ERR! stack at addChunk (_stream_readable.js:305:12)
node-pre-gyp ERR! System Linux 4.4.0-17134-Microsoft
node-pre-gyp ERR! command "/usr/bin/node" "/home/cyberscape/ccr/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build=false"
node-pre-gyp ERR! cwd /home/cyberscape/ccr/node_modules/@mapbox/mapbox-gl-native
node-pre-gyp ERR! node -v v12.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/@mapbox/mapbox-gl-native/v5.0.2/node-v72-linux-x64-Release.tar.gz
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @mapbox/[email protected] install: node-pre-gyp install --fallback-to-build=false
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @mapbox/[email protected] install 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! /home/cyberscape/.npm/_logs/2019-11-10T17_19_36_131Z-debug.log```
Nevermind, source of the problem was that Ubuntu was misbehaving. The install command was using Node v12 instead of Node v10. Switched to root via sudo bash, switched Node version via nvm use 10, and it works now.
Found this out through the 72 in the tarball URL, pointing to Node 12.x, which is the ABI number and how changing it to 64 resulted in a download rather than a 403 error.
Most helpful comment
Nevermind, source of the problem was that Ubuntu was misbehaving. The install command was using Node v12 instead of Node v10. Switched to root via
sudo bash, switched Node version vianvm use 10, and it works now.Found this out through the 72 in the tarball URL, pointing to Node 12.x, which is the ABI number and how changing it to 64 resulted in a download rather than a 403 error.