Skip to content

Errors when a dependency is specified as https://gitlab.com/owner/repo" #11533

@vtamara

Description

@vtamara

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

No response

Which area(s) of pnpm are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

mkdir /tmp/pnpm-repro && cd /tmp/pnpm-repro
cat > package.json << 'EOF'
{
  "name": "pnpm-repro",
  "private": true,
  "type": "module",
  "dependencies": {
    "@pasosdejesus/m": "https://gitlab.com/pasosdejesus/m"
  },
  "packageManager": "pnpm@11.0.8"
}
EOF
pnpm install
node -e "import('@pasosdejesus/m/test-utils/viem-mocks')"

Describe the Bug

The reproduction steps will produce:

ERR_PNPM_FETCH_406: GET https://gitlab.com/api/v4/projects/pasosdejesus%2Fm/repository/archive.tar.gz?sha=... Not Acceptable - 406

Editing the package.json file and changing

    "packageManager": "pnpm@11.0.8"

for

    "packageManager": "pnpm@10.33.0"

And then running

rm -rf node_modules
pnpm i
node -e "import('@pasosdejesus/m/test-utils/viem-mocks')"

will produce

TypeError [ERR_INVALID_MODULE_SPECIFIER]: Invalid module
"/tmp/pnpm-repro/node_modules/.pnpm/@pasosdejesus+m@https+++gitlab.com+api+...
+projects+pasosdejesus%2Fm+..."
must not include encoded "/" or "\" characters

Expected Behavior

Should be able to install dependencies from GitLab without error.

Which Node.js version are you using?

22.20.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

OpenBSD/adJ 7.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions