Skip to content

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