Skip to content

shelljs.exec cannot find app.asar/node_modules/shelljs/src/exec-child.js #881

@davidv1992

Description

@davidv1992

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

electron 1.8.6 prebuilt from electron-builder

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

shelljs 0.8.2

Operating system:

ubuntu 18.04

Description of the bug:

I am building an electron app using shelljs, and after packaging with electron-builder, using shelljs.exec fails, returning null and printing the following stacktrace on the console:

Error: Cannot find module '/redacted/dist/linux-unpacked/resources/app.asar/node_modules/shelljs/src/exec-child.js'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3

Example ShellJS command to reproduce the error:

exec(`find /bin /usr/bin /usr/local/bin -executable -name 'thunderbird' \\( -type f -or -type l \\)`)

Metadata

Metadata

Assignees

No one assigned

    Labels

    electronBugs specific to the electron framework

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions