What happened?
devbox with nodejs does not start anymore due to root package.json configuration spilling into .devbox internal working.
Steps to reproduce
- Create a folder
- Add the file
package.json with {"type":"module"}
- Add the file
devbox.json with {"include":["plugin:nodejs"]}
- Run
devbox shell
(OS: WSL Debian)
(nodejs@24 plugin_version: 0.0.3)
Command
shell
devbox.json
Devbox version
0.17.3
Nix version
No response
What system does this bug occur on?
Other (please include in the description above)
Debug logs
✓ Computed the Devbox environment.
Starting a devbox shell...
file:///.../devboxtest/.devbox/virtenv/nodejs/bin/setup-corepack.js:12
const { execFileSync } = require("node:child_process");
^
ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and '/.../devboxtest/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
at file:///.../devboxtest/.devbox/virtenv/nodejs/bin/setup-corepack.js:12:26
at ModuleJob.run (node:internal/modules/esm/module_job:430:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:661:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)
What happened?
devbox with nodejs does not start anymore due to root
package.jsonconfiguration spilling into.devboxinternal working.Steps to reproduce
package.jsonwith{"type":"module"}devbox.jsonwith{"include":["plugin:nodejs"]}devbox shell(OS: WSL Debian)
(nodejs@24 plugin_version: 0.0.3)
Command
shell
devbox.json
{ "include": ["plugin:nodejs"] }Devbox version
0.17.3
Nix version
No response
What system does this bug occur on?
Other (please include in the description above)
Debug logs