volta
volta copied to clipboard
volta cannot install node-gyp
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.
Looooong-delayed follow-up, but:
- The "right" answer here is to
yarn add node-gypfor the project. - The error there appears to be an
npmissue; doyarn install --globalornpm install --globalwork fornode-gyp?