install-peerdeps
install-peerdeps copied to clipboard
Installing peer dependencies on windows
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 [email protected]
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 [email protected] 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 [email protected] enzyme@^3.0.0 "react@^16.0.0-0" "react-dom@^16.0.0-0" --no-save
it will run successfully.
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
.
Edit: tests are taking a long time on Travis, but will merge when those are done
@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.
@MFry Interesting - didn't realize that. I'll run tests on different NPMs and see what happens. Thanks for letting me know.
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.
bump