npm / npm/cli

[BUG] gypfile:false no more honored

Open
#3,341 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Priority 2 Release 7.x
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Is there an existing issue for this?
  • I have searched the existing issues
Current Behavior

We ship the compiled node addons with our npm package. To prevent npm from trying to build the package on npm install we set "gypfile":false in the package.json. It worked fine up to npm v6.x but doesn't work in npm v7.13.0.

If this is the new default behaviour and "gypfile":false is dropped altogether (like yarn doesn't honour this too), do we have any alternate way to prevent npm from building the package on npm install.

Expected Behavior

npm install should not attempt to rebuild the package when "gypfile":false

Steps To Reproduce

No response

Environment
  • OS: macOS 11.0
  • Node: 16
  • npm: 7.13.0

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

The issue names no files or tests. Start by reproducing npm 7.13.0 with a package containing "gypfile": false, then trace the npm install path that decides whether to rebuild the package. Done means npm install no longer attempts the rebuild when that setting is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.