What happened?
Recently nodejs-slim changed to no longer include corepack as a default output. This breaks the Node.js plugin, which tries to run corepack when DEVBOX_COREPACK_ENABLED is true.
A workaround is to use a flake reference so that the additional corepack output can be specified (this requires the nodejs plugin to be explicitly added):
"packages": [
"github:NixOS/nixpkgs/nixpkgs-unstable#nodejs-slim_24^out,corepack"
],
"include": [
"plugin:nodejs"
]
But there are drawbacks with this workaround:
Steps to reproduce
devbox create --template node-yarn
cd node-yarn
devbox rm nodejs
devbox add nodejs-slim
devbox shell --pure
Output:
Info: Ensuring packages are installed.
✓ Computed the Devbox environment.
Starting a devbox shell...
bash: corepack: command not found
bash: yarn: command not found
Command
shell
devbox.json
Devbox version
0.17.0
Nix version
nix (Nix) 2.26.2
What system does this bug occur on?
Linux (x86-64)
Debug logs
No response
What happened?
Recently
nodejs-slimchanged to no longer includecorepackas a default output. This breaks the Node.js plugin, which tries to runcorepackwhenDEVBOX_COREPACK_ENABLEDistrue.A workaround is to use a flake reference so that the additional
corepackoutput can be specified (this requires thenodejsplugin to be explicitly added):But there are drawbacks with this workaround:
Steps to reproduce
devbox create --template node-yarncd node-yarndevbox rm nodejsdevbox add nodejs-slimdevbox shell --pureOutput:
Command
shell
devbox.json
{ "packages": ["nodejs-slim@latest"], "env": { "DEVBOX_COREPACK_ENABLED": "true" }, "shell": { "init_hook": [ "yarn install" ], "scripts": { "run_test": "yarn start" } } }Devbox version
0.17.0
Nix version
nix (Nix) 2.26.2
What system does this bug occur on?
Linux (x86-64)
Debug logs
No response