Skip to content

--corepack-enabled doesn't work with Node.js 25 #1469

@jessestricker

Description

@jessestricker

Installing Node.js 25 (or later) does not work when also using the --corepack-enabled flag.
This is because as of Node.js 25, corepack is no longer bundled in the Node.js installation and has to be installed separately.

To reproduce, run the following:

$ fnm --version
fnm 1.38.1

$ fnm install 25 --corepack-enabled
Installing Node v25.0.0 (x64)
Enabling corepack for Node v25.0.0
error: Can't enable corepack: Can't spawn program: No such file or directory (os error 2)
Maybe the program /home/jesse/.local/share/fnm/node-versions/v25.0.0/installation/bin/corepack does not exist on not available in PATH?

As a workaround, do the following (once):

$ FNM_COREPACK_ENABLED=false fnm install 25
Installing Node v25.0.0 (x64)

$ fnm exec --using=25 npm install -g corepack

added 1 package in 136ms

$ fnm use 25 --corepack-enabled
Using Node v25.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions