Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package.json: Specify node-gyp as a dependency #159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SEAPUNK
Copy link

@SEAPUNK SEAPUNK commented Apr 29, 2020

Because node-gyp is used as part of the install lifecycle script, node-gyp should be provided as a dependency, not as a devDependency.

This should fix installs of this package in Yarn 2. No errors occur in Yarn 1 because Yarn 1 (and presumably also npm) attempt to add the globally installed node-gyp binary to $PATH before running the script: https://github.com/yarnpkg/yarn/blob/a3b1294c22043cd8868b6a1decb77b673e764efd/src/util/execute-lifecycle-script.js#L173

However, this does not guarantee that the node-gyp that will be used to install this package will be the same version as the one specified in devDependencies, so this should also reconcile that behavior... I hope.

I tested this fix locally, and it seems to make Yarn 2 happy.

refs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant