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

Installing peer dependencies on windows #33

Open
MFry opened this issue Jul 23, 2018 · 6 comments
Open

Installing peer dependencies on windows #33

MFry opened this issue Jul 23, 2018 · 6 comments

Comments

@MFry
Copy link

MFry commented Jul 23, 2018

When running install-peerdeps the install will fail if the packages end in -0.

Version

OS: Windows 7

$ node -v 
v8.11.2

$ npm --version
6.2.0

install-peerdeps v1.8.0

Reproduce

$ install-peerdeps -S enzyme-adapter-react-16

npm ERR! code ETARGET
npm ERR! notarget No matching version found for react@16.0.0-0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

The issue occurs when the install-peerdeps evaluates
e.x.
npm install enzyme-adapter-react-16@1.1.1 enzyme@^3.0.0 react@^16.0.0-0 react-dom@^16.0.0-0 --no-save
which will fail, but if you place the react and react-dom in quotation marks like:
npm install enzyme-adapter-react-16@1.1.1 enzyme@^3.0.0 "react@^16.0.0-0" "react-dom@^16.0.0-0" --no-save
it will run successfully.

nathanhleung added a commit that referenced this issue Aug 2, 2018
@nathanhleung
Copy link
Owner

nathanhleung commented Aug 2, 2018

Thanks for the specific repro information - the quotation marks, however, don't seem to be working for me (I'm on NPM v5.6.0). Removing the '-0' seems to work, though, which is how I'm going to resolve this issue (in fact, just merged the fix branch into master).

I'm going to do a new release soon, but if you need the fix now you can pull from the latest master.

@nathanhleung
Copy link
Owner

Edit: tests are taking a long time on Travis, but will merge when those are done

nathanhleung added a commit that referenced this issue Aug 2, 2018
nathanhleung added a commit that referenced this issue Aug 2, 2018
nathanhleung added a commit that referenced this issue Aug 2, 2018
nathanhleung added a commit that referenced this issue Aug 2, 2018
nathanhleung added a commit that referenced this issue Aug 2, 2018
@MFry
Copy link
Author

MFry commented Aug 2, 2018

@nathanhleung the -0 is valid semver range and accordingly enzyme devs mentioned
"The -0 is necessary to allow for prerelease versions...".

Not sure if there are additional issues with npm 5.6.0 , but it works as intended on 6.2 when using the quotes.

@nathanhleung
Copy link
Owner

@MFry Interesting - didn't realize that. I'll run tests on different NPMs and see what happens. Thanks for letting me know.

@nathanhleung nathanhleung reopened this Aug 2, 2018
nathanhleung added a commit that referenced this issue Jan 6, 2019
nathanhleung added a commit that referenced this issue Jan 6, 2019
@stale
Copy link

stale bot commented Dec 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 21, 2019
@ljharb
Copy link
Collaborator

ljharb commented Dec 21, 2019

bump

@stale stale bot removed the stale label Dec 21, 2019
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

3 participants