TryGhost / node-sqlite3

SQLite3 bindings for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v5.1.7 changes the usage of a binary mirror (incompatibly)

SchroederSteffen opened this issue · comments

Issue Summary

With #1735, the usage of a binary mirror doesn't work anymore like before.

We build on machines that can only access our internal artifact registry, but not the public internet like GitHub.
Hence, we need to overwrite the binary host mirror.

Previously, with node-pre-gyp this was possible by setting the environment variable node_sqlite3_binary_host_mirror.
Now, with prebuild-install, you need to set the environment variable sqlite3_binary_host_mirror (note the removed prefix node_). See https://github.com/prebuild/prebuild-install#custom-binaries.
(In our case we also needed to remove a trailing /. This may not apply to everyone.)

While this is only a minor adjustment, it turns v5.1.7 into an incompatible release for us.
I'm opening this issue for documentation purposes and to ask you to consider such changes in the future and maybe release a new major version to indicate the breaking nature.

Probably related: #1748

Relevant logs or output

14:20:54 ERROR - code 1
14:20:54 ERROR - path /[...]/gen/tmp/src/node_modules/sqlite3
14:20:54 ERROR - command failed
14:20:54 ERROR - command sh -c prebuild-install -r napi || node-gyp rebuild
14:20:54 ERROR - prebuild-install warn install connect ECONNREFUSED 140.82.112.3:443
14:20:54 ERROR - gyp info it worked if it ends with ok
14:20:54 ERROR - gyp info using node-gyp@8.4.1
14:20:54 ERROR - gyp info using node@18.19.1 | linux | x64
14:20:54 ERROR - gyp info find Python using Python version 3.11.4 found at "/opt/python311/bin/python3"
14:20:54 ERROR - gyp http GET https://nodejs.org/download/release/v18.19.1/node-v18.19.1-headers.tar.gz
14:20:54 ERROR - gyp WARN install got an error, rolling back install
14:20:54 ERROR - gyp ERR! configure error 
14:20:54 ERROR - gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v18.19.1/node-v18.19.1-headers.tar.gz failed, reason: connect ECONNREFUSED 104.20.22.46:443
14:20:54 ERROR - gyp ERR! stack at ClientRequest.<anonymous> (/[...]/gen/tmp/src/node_modules/minipass-fetch/lib/index.js:110:14)
14:20:54 ERROR - gyp ERR! stack at ClientRequest.emit (node:events:517:28)
14:20:54 ERROR - gyp ERR! stack at TLSSocket.socketErrorListener (node:_http_client:501:9)
14:20:54 ERROR - gyp ERR! stack at TLSSocket.emit (node:events:529:35)
14:20:54 ERROR - gyp ERR! stack at emitErrorNT (node:internal/streams/destroy:151:8)
14:20:54 ERROR - gyp ERR! stack at emitErrorCloseNT (node:internal/streams/destroy:116:3)
14:20:54 ERROR - gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
14:20:54 ERROR - gyp ERR! System Linux 5.3.18-150300.59.153-default
14:20:54 ERROR - gyp ERR! command "/[...]/bin/node" "/[...]/gen/tmp/src/node_modules/.bin/node-gyp" "rebuild"
14:20:54 ERROR - gyp ERR! cwd /[...]/gen/tmp/src/node_modules/sqlite3
14:20:54 ERROR - gyp ERR! node -v v18.19.1
14:20:54 ERROR - gyp ERR! node-gyp -v v8.4.1
14:20:54 ERROR - gyp ERR! not ok

Version

5.1.7

Node.js Version

18

How did you install the library?

npm