-
Notifications
You must be signed in to change notification settings - Fork 19
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
Incorrect selection of package version #71
Comments
You could use |
@ljharb I think |
BTW, my workaround to this issue seems to completely obviate the need for npm info <package> peerDependencies --json | jq -r 'keys[] as $k | "\($k)@\"\(.[$k])\""' | xargs npm install --save-dev |
No, it wouldn’t - the caret is an identical (and simpler and more widely understood) range than the one you have. |
I think I have a similar case where Example:
I'm expecting to get eslint@7.4.0 here. Is that expectation incorrect? |
I would expect the npm install command to be |
Yeah, I believe this is a bug - I think it may be causing facebook/create-react-app#10465 reported by @uebriges. |
Just tested with @uebriges, and it seems this is indeed a problem. We tested on a Windows 10 machine - not sure if this is a relevant detail. Failing ReproReproduction 1 uses mkdir reproduction
cd reproduction
npx create-react-app .
npx install-peerdeps --yarn --dev eslint-config-react-app
yarn start Succeeding ReproReproduction 2 uses a manual mkdir reproduction-two
cd reproduction-two
npx create-react-app .
yarn add --dev eslint-config-react-app @typescript-eslint/eslint-plugin@^4.0.0 @typescript-eslint/parser@^4.0.0 babel-eslint@^10.0.0 eslint@^7.5.0 eslint-plugin-flowtype@^5.2.0 eslint-plugin-import@^2.22.0 eslint-plugin-jsx-a11y@^6.3.1 eslint-plugin-react@^7.20.3 eslint-plugin-react-hooks@^4.0.8 eslint-plugin-jest@^24.0.0
yarn start |
@karlhorky really appreciate your testing here, glad we're squashing all these bugs! Opened #126 which should hopefully fix -- can you let me know if that works for you? |
Sure! @uebriges and I will test: #126 (comment) |
Ah seems like this solution in #126 doesn't work after all (installing the You can see this with this example dependency:
|
same problem on a Windows 11 machine |
I have an
eslint-config-myconfig
package in a private registry having the following peer dependencies:When I run
install-peerdeps
, I'm getting a "no matching version" error:It appears that install-peerdeps is not using the exact same semver expression when issuing the "npm install" command. So, instead of
npm install typescript@">=3.8 <4"
, it's just reading the first literal a.b.c number.A quick debug shows the command being executed:
The text was updated successfully, but these errors were encountered: