Node version (or tell us if you're using electron or some other framework):
- Node.js v20.12.2
- Next.js v14.2.3
ShellJS version (the most recent version/Github branch you see the bug on):
Operating system:
Description of the bug:
When running shelljs.exec() on a server action, this error gets thrown in the server console.
Error: Cannot find module '/.next/server/vendor-chunks/exec-child.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
at Module._load (node:internal/modules/cjs/loader:984:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Example ShellJS command to reproduce the error:
import shell from "shelljs";
shell.exec("which docker");