Incorrect selection of package version
See original GitHub issueI have an eslint-config-myconfig
package in a private registry having the following peer dependencies:
"peerDependencies": {
"@typescript-eslint/eslint-plugin": ">=2.21 <3",
"@typescript-eslint/parser": ">=2.21 <3",
"eslint": ">=6.8 <7",
"eslint-config-airbnb-typescript": ">=7 <8",
"eslint-config-prettier": ">=6.10 <7",
"eslint-plugin-import": ">=2.20 <3",
"eslint-plugin-prettier": ">=3.1 <4",
"eslint-plugin-security": ">=1.4 <2",
"prettier": ">=1.19 <2",
"typescript": ">=3.8 <4"
},
When I run install-peerdeps
, I’m getting a “no matching version” error:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for typescript@3.8.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.
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:
npm [
'install',
'eslint-config-insight@0.1.0',
'@typescript-eslint/eslint-plugin@2.21.0',
'@typescript-eslint/parser@2.21.0',
'eslint@6.8.0',
'eslint-config-airbnb-typescript@7.0.0',
'eslint-config-prettier@6.10.0',
'eslint-plugin-import@2.20.0',
'eslint-plugin-prettier@3.1.0',
'eslint-plugin-security@1.4.0',
'prettier@1.19.0',
'typescript@3.8.0',
'--save-dev'
]
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
pip displays incorrect version of package - Stack Overflow
Suppose the package version that is misunderstood by pip is pandas . So that the behavior you observe is that: pip list --outdated....
Read more >VS code shows incorrect latest version of a package ... - GitHub
I noticed recently that VS code doesn't show the correct latest version of some packages on hover in package.json file.
Read more >Package operation failed due to incorrect version of Python
Package operation failed due to incorrect version of Python · Main error is "ValueError: /usr/bin/python does not match the python default version. It...
Read more >Select upgrade of ONTAP 9 fails with error Package corrupted ...
Issue. ONTAP Select fails to process image packet with error (ImageManager) Package corrupted or incorrect-Version missing.
Read more >Selective dependency resolutions - Yarn
Yarn supports selective version resolutions, which lets you define custom package versions or ranges inside your dependencies through the resolutions field ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would expect the npm install command to be
@^7
and not@7.0.0
or@7.4.0
- that seems like a bug.same problem on a Windows 11 machine