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

Flow-bin checking fails to search parent package.json #999

Closed
mikelambert opened this issue Jun 30, 2017 · 3 comments
Closed

Flow-bin checking fails to search parent package.json #999

mikelambert opened this issue Jun 30, 2017 · 3 comments

Comments

@mikelambert
Copy link

I have flow-bin installed in a parent package (since I want to keep my versioning in one place).

I have sub-packages, each with their own package.json. Unfortunately, trying to run flow-typed on these packages fails, because it can't find flow-bin:

cd UNCAUGHT ERROR: Error: Failed to find a flow-bin dependency in package.json.
Please install flow-bin: `npm install --save-dev flow-bin`

flow-typed should be smart enough to walk up the directory tree of package.json files looking for flow-bin, instead of checking only the current package.json.

@gantoine
Copy link
Member

gantoine commented Jul 2, 2017

If you could specify the directory of the package.json where flow-bin in installed, would that be good enough? Kinda like how they did it here: import-js/eslint-plugin-import#685

@mikelambert
Copy link
Author

To be clear, you're proposing asking the user to pass commandline args for data the code could figure out itself, right?

But yes, it would work for my purposes. I'm hiding this call behind gulp tasks, so I can just pass extra args, and won't have to remember the syntax to use it.

@gantoine
Copy link
Member

gantoine commented Jul 2, 2017

Yes, exactly. It's not ideal, but its good enough.

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

No branches or pull requests

2 participants