volta icon indicating copy to clipboard operation
volta copied to clipboard

volta cannot install node-gyp

Open assertnotnull opened this issue 3 years ago • 1 comments

In my project a dependency uses node-gyp and doing yarn install gives an error that it's missing. If I try to volta install node-gyp it gives me:

❯ volta install node-gyp --verbose
[verbose] Acquiring lock on Volta directory: /home/patrice/.volta/volta.lock
[verbose] Found default configuration at '/home/patrice/.volta/tools/user/platform.json'
[verbose] [email protected] has already been fetched, skipping download
[verbose] [email protected] has already been fetched, skipping download
[verbose] Installing node-gyp with command: "npm" "install" "--global" "--loglevel=warn" "--no-update-notifier" "--no-audit" "node-gyp"
[verbose] [install stderr]
npm ERR! Workspaces not supported for global packages

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/patrice/.npm/_logs/2022-05-12T14_47_28_927Z-debug-0.log

[verbose] [install stdout]

[verbose] Unlocking Volta Directory
error: Could not install package 'node-gyp'

Please confirm the package is valid and run with `--verbose` for more diagnostics.
[verbose] No custom hooks found

I've also tried installing it doing yarn global add node-gyp now when I repeat yarn install it's good but the moment I do yarn add someLib it fails.

assertnotnull avatar May 12 '22 14:05 assertnotnull

Looooong-delayed follow-up, but:

  1. The "right" answer here is to yarn add node-gyp for the project.
  2. The error there appears to be an npm issue; do yarn install --global or npm install --global work for node-gyp?

chriskrycho avatar Dec 20 '23 02:12 chriskrycho