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

unable to find package.json in module's subdirectory #1910

Closed
Coderah opened this issue Nov 17, 2016 · 9 comments
Closed

unable to find package.json in module's subdirectory #1910

Coderah opened this issue Nov 17, 2016 · 9 comments

Comments

@Coderah
Copy link

Coderah commented Nov 17, 2016

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 the gamepaddirectory, 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

@Coderah
Copy link
Author

Coderah commented Nov 17, 2016

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.

@Coderah
Copy link
Author

Coderah commented Nov 17, 2016

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.

@wyze
Copy link
Member

wyze commented Nov 17, 2016

I suspect this is due to gamepad defining node-pre-gyp in bundledDependencies but yarn is hoisting it up to the top level anyways.

@wyze wyze added cat-bug and removed needs triage labels Nov 17, 2016
@wyze
Copy link
Member

wyze commented Nov 17, 2016

Can still reproduce this on 0.17.4.

@paralin
Copy link

paralin commented Dec 10, 2016

I'm encountering this now as well.

@nwwells
Copy link

nwwells commented Jan 3, 2017

Seeing this in 0.18.0 as well. pre-installing node-pre-gyp doesn't resolve the issue for me.

@gabriel
Copy link

gabriel commented Jan 27, 2017

I think I have a similar problem, might be a dupe or might not, so created an issue here: #2571

@rodrigopivi
Copy link

It's a problem with node-pre-gyp, the issue is already fixed at master, but not at the latest release (v0.6.32).

mapbox/node-pre-gyp#262

@bestander
Copy link
Member

merging with #886

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

No branches or pull requests

7 participants