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 failure on Node 21 #1143

Closed
skeet70 opened this issue Dec 4, 2023 · 1 comment · Fixed by #1144
Closed

Exec failure on Node 21 #1143

skeet70 opened this issue Dec 4, 2023 · 1 comment · Fixed by #1144
Labels

Comments

@skeet70
Copy link
Contributor

skeet70 commented Dec 4, 2023

Node version (or tell us if you're using electron or some other framework):

21.3.0

ShellJS version (the most recent version/Github branch you see the bug on):

0.8.5

Operating system:

NixOS and Ubuntu 22.04

Description of the bug:

A script that ran fine in Node 16/18/20 errors when run in Node 21.

[nix-shell:~/code/ironcore/recrypt-node-binding]$ node publish.js
/home/mumu/code/ironcore/recrypt-node-binding/node_modules/shelljs/src/common.js:399
        throw e;
        ^

Error [ShellJSInternalError]: ENOENT: no such file or directory, open '/run/user/1000/shelljs_6f547a18b9ffbc16419a'
    at Object.writeFileSync (node:fs:2352:20)
    at writeFileLockedDown (/home/mumu/code/ironcore/recrypt-node-binding/node_modules/shelljs/src/exec.js:61:8)
    at execSync (/home/mumu/code/ironcore/recrypt-node-binding/node_modules/shelljs/src/exec.js:66:3)
    at Object._exec (/home/mumu/code/ironcore/recrypt-node-binding/node_modules/shelljs/src/exec.js:223:12)
    at Object.exec (/home/mumu/code/ironcore/recrypt-node-binding/node_modules/shelljs/src/common.js:335:23)
    at Object.<anonymous> (/home/mumu/code/ironcore/recrypt-node-binding/publish.js:31:7)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/run/user/1000/shelljs_6f547a18b9ffbc16419a'
}

Node.js v21.3.0

Example ShellJS command to reproduce the error:

shell.exec("yarn install --ignore-scripts");
@nfischer
Copy link
Member

nfischer commented Dec 7, 2023

I'm going to close this as wontfix. As discussed on #1144, this issue was a nodejs bug that was fixed in 21.4 so there's no need to patch shelljs.

@nfischer nfischer closed this as completed Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants