node-sqlite3 icon indicating copy to clipboard operation
node-sqlite3 copied to clipboard

npm install error

Open vincent7128 opened this issue 8 years ago • 5 comments

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

vincent7128 avatar Mar 02 '18 09:03 vincent7128

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

mapsam avatar Mar 05 '18 17:03 mapsam

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

vincent7128 avatar Mar 06 '18 03:03 vincent7128

403 is a misleading error, then. shouldn't that be a 404?

worc avatar Apr 06 '18 18:04 worc

@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 avatar Apr 06 '18 19:04 mapsam

@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.

worc avatar Apr 06 '18 19:04 worc