shelljs / shelljs/shelljs

ShellJSInternalError: ENOENT: no such file or directory, open '/tmp/shelljs_...'

Open
#1,024 26 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

exec needs feedback
Dominant language
JavaScript
Stars
14.4k
Forks
756
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stack-trace locations in src/exec.js, especially execSync around line 89 and _exec around line 205. Reproduce the reported shelljs.exec("git clone " + gitUrl) call under Node v14.8.0 on Ubuntu and inspect the temporary-file handling. Done means the command no longer raises ENOENT for the temporary output file.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, javascript, nodejs
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.