Skip to content

shell.exec does not recognize 'webpack' #781

@sriyan

Description

@sriyan

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

v6.11.2

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

0.7.8

Operating system:

Windows 10

Description of the bug:

I tried to run a webpack command through shelljs exec method. But got
'webpack' is not recognized as an internal or external command, operable program or batch file.

Example ShellJS command to reproduce the error:

var command = 'webpack --optimize-minimize --config webpack.config.js';
if (shell.exec(command).code !== 0) {
        shell.echo(`Error occurred while executing: ${command}`);
        shell.exec('pause');
}

Metadata

Metadata

Assignees

Labels

questionQuestion from a user (which may not require code/documentation changes to the project)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions