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

[BUG] <title> report 'no matching version found' error during second npm install #7138

Closed
2 tasks done
zhangchen97 opened this issue Jan 15, 2024 · 2 comments
Closed
2 tasks done
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release

Comments

@zhangchen97
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

the package.json content of my project:

"dependencies": {
"A": "file:./deps/A1@4.9.5-r3.tgz'
"B": "file:./deps/B1@1.1.3.tgz'
}

the package.json content of package "B":

"dependencies":{
    "commander": "^9.3.0",
    "fs-extra": "^10.1.0",
    "json5": "^2.2.3",
    "source-map": "0.7.4",
    "A":"npm:A1@4.9.5-r6"
}

However, A1@4.9.5-r6 is non-existent and I accidentally added it.

The package-lock.json file in my project does not contain information about A@4.9.5-r6.
Information about other packages exists, that is "A": "file:./deps/A1@4.9.5-r3.tgz'、"commander": "^9.3.0"、"fs-extra": "^10.1.0"、"json5": "^2.2.3"、"source-map": "0.7.4".

Operation commands and symptoms:
When I run the npm install command for the first time, no error is reported. A1@4.9.5-r3.tgz is successfully installed, but A1@4.9.5-r6 is not successfully installed.

When I run the npm install command for the second time, the following error information is displayed: error notarget No matching version found for A1@4.9.5-r6.

Expected Behavior

When I run npm install for the first time, the error message "error notarget No match version found'A1@4.9.5-r6'" is displayed.

More importantly, I want to know why no error is reported when npm install is executed for the first time, and the error is reported for the second time.

Steps To Reproduce

  1. In this environment...
  2. With this config...
  3. Run '...'
  4. See error...

Environment

  • npm: 6.14.17
  • Node.js:14.12.1
  • OS Name: linux
  • System Model Name:
  • npm config:
    '
    strict-ssl=false
    package-lock=true
    '
; copy and paste output from `npm config ls` here
@zhangchen97 zhangchen97 added Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release labels Jan 15, 2024
@milaninfy
Copy link
Contributor

@zhangchen97 Not reproducible for me. I tried replicating similer setup as you describe in the issue. On the first time install I am getting "No matching version found"

~/workarea/7138 $ npm install
npm error code ETARGET
npm error notarget No matching version found for peerpkg@9.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.

can you try replicating this problem on the latest version of npm? (ie. npm i -g npm)

@milaninfy
Copy link
Contributor

Closing due to age. If this is still a problem please feel free to reopen this issue, or create a new issue w/ steps to reproduce.

@milaninfy milaninfy closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release
Projects
None yet
Development

No branches or pull requests

2 participants