这是indexloc提供的服务,不要输入任何密码
Skip to content

When a URL is used for packageManager field of package.json, an error is thrown ("expected to match regular expression") #9611

@pkerschbaum

Description

@pkerschbaum

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://codesandbox.io/p/devbox/https-github-com-inversify-inversifyjs-issues-1630-forked-mk4dgv?workspaceId=ws_UGoaic2rUkCT9cicv4uPWU

Which canary version will you have in your reproduction?

2.3.4-canary.2

Enviroment information

turbo 2.3.4-canary.2

CLI:
   Version: 2.3.4-canary.2
   Path to executable: /project/workspace/node_modules/.pnpm/turbo-linux-64@2.3.4-canary.2/node_modules/turbo-linux-64/bin/turbo
   Daemon status: Running
   Package manager: pnpm

Platform:
   Architecture: x86_64
   Operating system: linux
   WSL: false
   Available memory (MB): 3018
   Available CPU cores: 2

Environment:
   CI: None
   Terminal (TERM): xterm-256color
   Terminal program (TERM_PROGRAM): unknown
   Terminal program version (TERM_PROGRAM_VERSION): unknown
   Shell (SHELL): /bin/bash
   stdin: false

Expected behavior

turbo run should work.

Actual behavior

turbo run throws an error:

➜  workspace git:(master) ✗ COREPACK_ENABLE_UNSAFE_CUSTOM_URLS=1 pnpm exec turbo run build
turbo 2.3.4-canary.2

invalid_package_manager_field

  × could not parse the packageManager field in package.json, expected to match regular expression (?P<manager>bun|npm|pnpm|yarn)@(?P<version>\d+\.\d+\.\d+(-.+)?)
   ╭─[/project/workspace/package.json:6:1]
 6 │   },
 7 │   "packageManager": "pnpm@https://registry.npmjs.org/@pkerschbaum/pnpm/-/pnpm-9.9.0-pkerschbaum-extensions-1.tgz",
   ·                     ──────────────────────────────────────────────┬──────────────────────────────────────────────
   ·                                                                   ╰── invalid `packageManager` field
 8 │   "dependencies": {
   ╰────

To Reproduce

  1. Open https://codesandbox.io/p/devbox/https-github-com-inversify-inversifyjs-issues-1630-forked-mk4dgv?workspaceId=ws_UGoaic2rUkCT9cicv4uPWU

  2. Run:

    corepack enable
    COREPACK_ENABLE_UNSAFE_CUSTOM_URLS=1 pnpm install
    COREPACK_ENABLE_UNSAFE_CUSTOM_URLS=1 pnpm exec turbo run build

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions