mapbox / mapbox/node-pre-gyp

Best practice configuration so that "npm rebuild" works?

Open
#646 1 comment 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

Hello,

In https://github.com/mapbox/node-pre-gyp#configuring an example config is shown which is adapted by many libraries that use node-gyp. We found out that this is not really working when people use "npm rebuild" on the root dir level after an nodejs upgrade in general, because this config always state "hey I'm already build and existing" even after a node.js upgrade.

After many experiments we found out that "--update-binary" as additional parameter is a ways to achieve that "npm rebuild" also updates the binary.

While discussing this in the "canvas" library" the question arised whats the "official node-pre-gyp" statement to that topic because the example is not containign this.

It would be awesome to get some opiions and insights from you as the experts :-)

More details about the current discussion we had and especially infos and effects of the alternative options like "lets user execute npm install instead of rebuild" can be found at https://github.com/Automattic/node-canvas/pull/1982

Thank you very much!

Ingo Fischer

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 with the configuring example in the linked node-pre-gyp documentation and review the node-canvas pull request 1982 for the reported npm rebuild behavior and alternatives. Done means reaching a maintainer-backed recommendation and documenting the official configuration or rebuild guidance.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.