Skip to content

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\corepack\dist\yarn.js' #751

Description

@Pnlvfx

I just upgraded to node 25 and the good news comes to me.
Corepack is no more bundled inside nodejs.

After some research I found that I have to do:
npm install -g corepack // extra
corepack enable // as usual
corepack use yarn@stable // as usual

the corepack use yarn@stable will work but then if I do:

yarn install

I get:

node:internal/modules/cjs/loader:1422
throw err;
^

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\corepack\dist\yarn.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1419:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
at Module._load (node:internal/modules/cjs/loader:1225:37)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:244:24)
at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
at node:internal/main/run_main_module:33:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Node.js v25.0.0

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions