Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec-child.js module not found, when running shell.exec() on Next.js Server Actions #1158

Open
AmruthPillai opened this issue May 14, 2024 · 0 comments

Comments

@AmruthPillai
Copy link

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):

  • ShellJS v0.8.5

Operating system:

  • macOS Sonoma 14.5

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");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant