Skip to content

[Bug?]: nodeExperimentalPackageMap + corepack #7210

Open

Description

@mrginglymus

Self-service

  • I'd be willing to implement a fix

Describe the bug

Executing a yarn script, where yarn is managed by corepack which has been installed into the global node_modules folder results in a fatal error:

Error [ERR_PACKAGE_MAP_EXTERNAL_FILE]: Cannot resolve "corepack/package.json" from "/home/ubuntu/actions-runner/_work/_tool/node/26.4.0/x64/lib/node_modules/corepack/dist/lib/corepack.cjs": file is not within any package defined in /home/ubuntu/actions-runner/_work/[....]/node_modules/.package-map.json

To reproduce

Using node 26 (supporting package maps),

nodeLinker: pnpm
nodeExperimentalPackageMap: true
npm install -g corepack
corepack enable
yarn tsc --noEmit

Environment

System:
    OS: Windows 11 10.0.26200
    CPU: (24) x64 Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz
  Binaries:
    Node: 26.4.0 - C:\Users\[...]\AppData\Local\Temp\xfs-4c02d330\node.CMD

Additional context

Fails on Windows + Linux in the same way. Appears only to occur with pnpm node linker.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions