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] npm treat every path from gitlab as git url even it is a dist path to .tgz #2405

Open
mmis1000 opened this issue Dec 23, 2020 · 1 comment
Labels
Bug thing that needs fixing cmd:install related to `npm install` Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release Release 8.x work is associated with a specific npm 8 release

Comments

@mmis1000
Copy link

mmis1000 commented Dec 23, 2020

Current Behavior:

Every path in gitlab generic package was treated as git repo url
For example https://gitlab.com/api/v4/projects/0000000/packages/generic/xxxxxxxx/0.0.1/dist.tar.gz

results in

npm ERR! code 128
npm ERR! command failed
npm ERR! command git ls-remote ssh://git@gitlab.com/api/v4/projects/0000000/packages/generic/xxxxxxxx/0.0.1/dist.tar.gz.git
npm ERR! remote: 
npm ERR! remote: ========================================================================
npm ERR! remote: 
npm ERR! remote: The namespace you were looking for could not be found.
npm ERR! remote: 
npm ERR! remote: ========================================================================
npm ERR! remote: 
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mmis1000/.npm/_logs/2020-12-23T05_24_20_136Z-debug.log

Expected Behavior:

It should be treated as a tarball url as the path suggests.
At least for path under the /api/ should just respect the path.
Instead of https://gitlab.com/api/v4/projects/0000000/packages/generic/xxxxxxxx/0.0.1/dist.tar.gz.git/

Steps To Reproduce:

  1. npm init
  2. npm i https://gitlab.com/api/v4/projects/0000000/packages/generic/xxxxxxxx/0.0.1/dist.tar.gz
  3. See the error

Environment:

  • OS: Mac 11.1
  • Node: v10.21.0
  • npm: 7.3.0

Note

The same bug exists in npm@6

@mmis1000 mmis1000 added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Dec 23, 2020
@darcyclarke darcyclarke removed the Needs Triage needs review for next steps label Jan 29, 2021
@ruyadorno
Copy link
Collaborator

Relates to: #3359

@ruyadorno ruyadorno added Priority 2 secondary priority issue cmd:install related to `npm install` Release 8.x work is associated with a specific npm 8 release labels Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing cmd:install related to `npm install` Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release Release 8.x work is associated with a specific npm 8 release
Projects
None yet
Development

No branches or pull requests

3 participants