Skip to content

[BUG] npx node-gyp@version runs the copy of node-gyp bundled with npm instead #3058

Closed
@DeeDeeG

Description

@DeeDeeG

Current Behavior:

  • npx node-gyp@8 runs the older node-gyp 7.1.2 that is bundled with npm.
    • /home/[me]/n-prefix/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js

Same result if doing plain npx node-gyp. The latest version is v8.0.0, but v7.1.2 is used instead. Happens even if node-gyp v8 is installed globally, and no node-gyp is installed in the location npx is run from.

Expected Behavior:

A separate npx-specific copy of node-gyp v8 should run. Or when node-gyp v8 is installed globally, that could be used.

Steps To Reproduce:

npx node-gyp or npx node-gyp@8 or npx node-gyp@8.0.0, etc.

Environment:

  • OS: Ubuntu 20.04, macOS 10.15.7 Catalina, Windows 10
  • Node: v14.16.1, v16.0.0-nightly2021041040ace47396
  • npm: 7.9.0

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 2secondary priority issueRelease 7.xwork is associated with a specific npm 7 releasecmd:execrelated to `npx`

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions