yarn add gamepad is resulting in an error:
error Couldn't find a package.json file in "./node_modules/gamepad/node_modules/node-pre-gyp"
and of course node_modules doesn't exist within thegamepaddirectory, howevernode-pre-gypdoes exist in./node_modulesdirectly and it contains apackage.json` file.
I've attempted removing node_modules and running yarn again.
NOTE: I've replaced the long path to my project with simply ./
yarn: v0.17.2
node: 6.9.1
ubuntu
by running yarn add node-pre-gyp the issue is resolved, however there may still be a bug considering there is nothing that guided me to doing that, nor am I sure I should need to.
the installation issue was resolved with the above, however actually requiring the module results in the same-ish errors, perhaps this is just due to the gamepad module doing something wrong.
I suspect this is due to gamepad defining node-pre-gyp in bundledDependencies but yarn is hoisting it up to the top level anyways.
Can still reproduce this on 0.17.4.
I'm encountering this now as well.
Seeing this in 0.18.0 as well. pre-installing node-pre-gyp doesn't resolve the issue for me.
I think I have a similar problem, might be a dupe or might not, so created an issue here: https://github.com/yarnpkg/yarn/issues/2571
It's a problem with node-pre-gyp, the issue is already fixed at master, but not at the latest release (v0.6.32).
merging with https://github.com/yarnpkg/yarn/issues/886
Most helpful comment
I suspect this is due to
gamepaddefiningnode-pre-gypinbundledDependenciesbut yarn is hoisting it up to the top level anyways.