In some situations it might be useful to have binaries for different platforms downloaded at once. For example, when using docker on Mac it's common to use npm on directly on Mac but actually run the code in the docker linux vm, which will fail due to incompatible binaries. It's possible to download for binaries for another platform by running for example npm run install -- --update-binary --target_platform=linux --target_libc=glibc, but since bcrypt uses the same file path regardless of platform/architecture this will replace the existing binary. I propose changing module_path or module_name to include platform, arch, and libc, like the package_name currently does. I can submit a PR for this if you're interested.
In some situations it might be useful to have binaries for different platforms downloaded at once. For example, when using docker on Mac it's common to use npm on directly on Mac but actually run the code in the docker linux vm, which will fail due to incompatible binaries. It's possible to download for binaries for another platform by running for example
npm run install -- --update-binary --target_platform=linux --target_libc=glibc
, but since bcrypt uses the same file path regardless of platform/architecture this will replace the existing binary. I propose changingmodule_path
ormodule_name
to includeplatform
,arch
, andlibc
, like thepackage_name
currently does. I can submit a PR for this if you're interested.Related issues: