mapbox / mapbox/node-pre-gyp

Node-pre-gyp doesn't work in Yarn “offline mode”

Open
#458 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

In our testing and deployment environment, we use Yarn in offline mode. This makes it impossible to use any NPM packages that use node-pre-gyp because it doesn't have a way to provide an alternative for downloading binaries if an internet connection isn't available. See this example repo that shows a very simple way to reproduce this failure.

One alternative we can consider is to allow node-pre-gyp to accept a path that points to where offline binaries are stored. Has anyone explored this before or run into a similar issue?

I will send a PR to demonstrate what we are looking for

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 linked example repository to reproduce the failure, then trace node-pre-gyp's binary download path and how Yarn offline mode affects it. The issue proposes accepting a path to offline binaries; done means an npm package using node-pre-gyp can install successfully without an internet connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.