mapbox / mapbox/node-pre-gyp

Compatibility with MSYS2

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

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.2k
Forks
271
Avg merge
23h 40m
Merged PRs (30d)
2

Description

[MSYS2](https://msys2.org) has recently gotten a working Node. However, packages with prebuilt native code, such as bcrypt, do not work as the node-pre-gyp detects the OS as Windows (technically correct), but the library is incompatible with this build of Node. So, I've opened this issue to ask whether there's a preferred path for something like this to be solved.

Running `node-pre-gyp rebuild` gets it working, but it would be better if node-pre-gyp could detect whether it's running within MSYS2, and either try to pull an MSYS2-specific prebuilt library, or skip it entirely, and fall back to building from source. The former might be an issue as there are [several variants of "native packages"](https://www.msys2.org/docs/environments/) in MSYS2, which are not compatible with each other.

More context here: https://github.com/msys2/MINGW-packages/issues/15048

Contributor guide

Open the contributing guide

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 `node-pre-gyp rebuild` in an MSYS2 environment and tracing how the OS is detected. Review the linked MSYS2 environments discussion before deciding whether completion means selecting compatible prebuilt binaries or consistently falling back to a source build.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.