Bypass HTTP download to use local binaries
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 271
- Avg merge
- 23h 40m
- Merged PRs (30d)
- 2
Description
Some packages do not have binaries for all platforms, like sqlite3. When trying to `npm install` it on arm64 arch, node-pre-gyp fails with a 403 error (node-pre-gyp: 0.17.0, npm 7.1.0, node 14.16.0), which is totally normal.
I could successfully build my own binaries for sqlite3, but the problem is that node-pre-gyp won't use them. When looking at the error stack, I could determine the path of the binaries:
```
npm ERR! node-pre-gyp info check checked for "root/project/server/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node" (not found)
```
But I did place the node_sqlite3.node file there (also tried with the .tar.gz), it's readable and even 777'd. I don't understand this error... Looks like a bug as the file mentioned is right where it is supposed to be.
Is there any reason why this isn't working, is there something else to do?
So my question is: how can I bypass the binary download and go directly to the unpack phase by providing locally the .node file?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the arm64 npm install scenario and inspect the node-pre-gyp download and unpack flow, using the mentioned node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node path as the starting point. Done means establishing whether a locally supplied .node file or archive can bypass HTTP download and documenting or implementing that behavior with a verifiable install path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100