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] --package-lock-only option fails with scoped private packages, regression #3964

Closed
1 task done
bigtimebuddy opened this issue Oct 29, 2021 · 4 comments
Closed
1 task done
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release

Comments

@bigtimebuddy
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Minimal reproduction is here:
https://github.com/bigtimebuddy/npm-bug-package-lock-only

Package structure is roughly this:

  • packages/package-a (@package/a)
    • devDependencies
      • @tools/a
  • package/tools-a (@tools/a) private

After doing a version bump of my workspaces packages, I use --package-lock-only option to update the package-lock.json file. Prior to npm@7.20.2 this worked fine. After then, it fails with the following message:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@tools%2fa - Not found
npm ERR! 404 
npm ERR! 404  '@tools/a@2.0.0' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2021-10-29T17_43_19_186Z-debug.log

Additional Links

Changed was introduced here: v7.20.2...v7.20.3
Additional context here: lerna/lerna#2891

Expected Behavior

With the reproduction, should get the following and not fail.

up to date, audited 6 packages in 1s

found 0 vulnerabilities

Steps To Reproduce

git clone https://github.com/bigtimebuddy/npm-bug-package-lock-only`
cd npm-bug-package-lock-only
npm i npm@8 -g
npm test

Environment

  • OS: macOS v11.6
  • Node: v12.20.1
  • npm: v8.1.2
@bigtimebuddy
Copy link
Author

Duplicate of #3637

@ljharb
Copy link
Contributor

ljharb commented Feb 1, 2022

In that case, it should be fixed in c99c215, in v8.4.0.

@ljharb ljharb closed this as completed Feb 1, 2022
@bigtimebuddy
Copy link
Author

It is not fixed in 8.4.0, issue above still reproduces.

@ljharb
Copy link
Contributor

ljharb commented Feb 1, 2022

in that case, can you comment that on #3637?

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 8.x work is associated with a specific npm 8 release
Projects
None yet
Development

No branches or pull requests

2 participants