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

Doesn't work with create-react-app #63

Closed
corysimmons opened this issue Dec 27, 2019 · 7 comments
Closed

Doesn't work with create-react-app #63

corysimmons opened this issue Dec 27, 2019 · 7 comments

Comments

@corysimmons
Copy link

$ npx install-peerdeps ookook

I created a create-react-app project and tried to use install-peerdeps to install another package, and its peers, to the CRA app.

npx create-react-app foo
cd foo
npx install-peerdeps ookook

I have peerdeps in that file.

What am I doing wrong? :\

Also, I've had problems with understanding how this project works exactly in the past. High level, how is it supposed to work? I would assume it would download a copy of ookook from npm, then look at the package.json of it for a peerDeps field, then loop over those deps running npm/yarn install/add dep.

@corysimmons
Copy link
Author

Huh. Works as expected without CRA...

Guess I should rename this issue.

@corysimmons corysimmons changed the title Doesn't work? Doesn't work with create-react-app Dec 27, 2019
@corysimmons
Copy link
Author

Seems to be related to It seems as if you are using Yarn. Would you like to use Yarn for the installation? (y/n) y

If I enter anything there, it just exits out silently/immediately. But npx install-peerdeps ookook -Y works as expected.

@AllanFerencz
Copy link

AllanFerencz commented Dec 31, 2019

I'm currently having the same issue with a different package.

npx install-peerdeps --dev eslint-config-wesbos

With a Next.js project.
I'm going to try passing the Y flag.

Using the -Y flag worked. Thanks

@nathanhleung
Copy link
Owner

Thanks for the report.

Also, I've had problems with understanding how this project works exactly in the past. High level, how is it supposed to work? I would assume it would download a copy of ookook from npm, then look at the package.json of it for a peerDeps field, then loop over those deps running npm/yarn install/add dep.

The project pulls the desired package's package.json from the registry, and then installs the desired package + all the peer dependencies in one command.

I'll add a note to the README to use the -Y flag with create-react-app.

@vhakulinen
Copy link

vhakulinen commented Jan 25, 2020

If I enter anything there, it just exits out silently/immediately. But npx install-peerdeps ookook -Y works as expected.

I had the same problem (while installing airbnb lint config) and this worked.

@corysimmons
Copy link
Author

I think the solution is to fix this inside the install-peerdeps lib rather than just adding a note to README.

@nathanhleung
Copy link
Owner

I think this should be fixed by #126. Please reopen with the command you ran and logs (if any) if this issue persists.

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

4 participants