shelljs: ShellJSInternalError: ENOENT: no such file or directory, open '/tmp/shelljs_...'
Node version (or tell us if you’re using electron or some other framework):
v14.8.0
ShellJS version (the most recent version/Github branch you see the bug on):
0.8.4
Operating system:
Ubuntu
Description of the bug:
ShellJSInternalError: ENOENT: no such file or directory, open '/tmp/shelljs_87bea80abecef2d76bf8'
at Object.openSync (node:fs:497:3)
at Object.readFileSync (node:fs:393:35)
at execSync (/root/rtag-deploy/node_modules/shelljs/src/exec.js:89:17)
at Object._exec (/root/rtag-deploy/node_modules/shelljs/src/exec.js:205:12)
at Object.exec (/root/rtag-deploy/node_modules/shelljs/src/common.js:335:23)
Example ShellJS command to reproduce the error:
shelljs_1["default"].exec("git clone " + gitUrl)
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 5
- Comments: 25 (10 by maintainers)
Any updates/workarounds on this issue? I’m running into it on my 12.22.1 Node environment running on AWS EC2. The command in specific I’m tryin to execute is
shell.exec('sed -i '' 1d file.cs'v). Thanks!Yes, I am running exec inside an express http handler. It usually works the first time after the server starts but on subsequent requests I get this error. Restarting the server makes it work again (for the next request).