npm install error
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v59-freebsd-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
try to:
fetch https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v59-freebsd-x64.tar.gz
get AccessDenied
system info:
system FreeBSD 11.1-RELEASE-p4 node -v v9.3.0 node-pre-gyp -v v0.6.38
Hi @vincent7128 - it looks like you're trying to install with node v9. Please try with a different version. The README states:
The sqlite3 module works with Node.js v0.10.x, v0.12.x, v4.x, v5.x, v6.x and v7.x.
Support for 8.x and 9.x ticket is here: https://github.com/mapbox/node-sqlite3/issues/939
The issues is not about the nodejs version, The real problem is there not have the Pre-built binaries file on the AWS server. [O] https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v59-linux-x64.tar.gz [X] https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v59-freebsd-x64.tar.gz
My workaround on freebsd:
npm install --build-from-source sqlite3
403 is a misleading error, then. shouldn't that be a 404?
@vincent7128 apologies, I didn't notice the freebsd portion of your error! Looking at previous versions of binaries, it doesn't appear node-sqlite3 has ever published for freebsd architectures. So relying on --build-from-source is your best bet right now.
403 is a misleading error, then. shouldn't that be a 404?
@worc This is due to the s3 list-bucket policies set for the binaries. A 403 is essentially a 404, in the case of sqlite3. More background: https://stackoverflow.com/questions/19037664/how-do-i-have-an-s3-bucket-return-404-instead-of-403-for-a-key-that-does-not-e#19038017
@mapsam okay, that makes sense. i'm tracking down what looks like mostly an environment issue with the build/compile step and that clears that part up. the freebsd binaries don't even exist.
however, in case anyone else ends up in the same place i am, i think i still have an issue with the python action in sqlite3.gyp not picking up on environment variables, npm/yarn configs, command flags, or even shell aliases when falling back to source compile with node-gyp. it's running python (which prints a warning to use a versioned command on the managed host i'm using) and not using the provided python flags or variables or aliases.