Skip to content

Exec failure on Node 21 #1143

@skeet70

Description

@skeet70

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");

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions