napi-rs / napi-rs/node-rs

Bundling `@node-rs/bcrypt` fails.

Open
#926 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.5k
Forks
52
Avg merge
13h 37m
Merged PRs (30d)
19

Description

I'm trying to bundle @node-rs/bcrypt with Rollup to deploy it to AWS Lambda.
However weirdly it only bundles the following files:

  • bcrypt.darwin-arm64_1.node
  • bcrypt.darwin-arm64_1_1.node

While my lambda is trying to load bcrypt.android-arm64.node.
Any idea why this is happening and how to solve it?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Rollup bundle for @node-rs/bcrypt and compare the native artifacts it includes with the artifact AWS Lambda tries to load. Investigate how Rollup resolves the package's platform-specific .node files; done means the bundle contains and loads the correct target artifact in Lambda.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, node.js, rollup
Domain
build-system, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.