shell-exec icon indicating copy to clipboard operation
shell-exec copied to clipboard

TypeError: shellExec is not a function

Open NormVg opened this issue 9 months ago • 1 comments

import shellExec from "shell-exec"; shellExec('echo Hi!').then(console.log).catch(console.log)

╰─ ❯❯ node test.js (node:34163) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/vishnu/room/aura/test.js is not specified and it doesn't parse as CommonJS. Reparsing as ES module because module syntax was detected. This incurs a performance overhead. To eliminate this warning, add "type": "module" to /home/vishnu/room/aura/package.json. (Use node --trace-warnings ... to show where the warning was created) file:///home/vishnu/room/aura/test.js:2 shellExec('echo Hi!').then(console.log).catch(console.log) ^

TypeError: shellExec is not a function at file:///home/vishnu/room/aura/test.js:2:1 at ModuleJob.run (node:internal/modules/esm/module_job:273:25) at async onImport.tracePromise.proto (node:internal/modules/esm/loader:600:26) at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:98:5)

Node.js v23.9.0

NormVg avatar Apr 01 '25 06:04 NormVg

+1

cloudmoonocus avatar Sep 11 '25 03:09 cloudmoonocus