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

shell.exec does not recognize 'webpack' #781

Closed
sriyan opened this issue Oct 12, 2017 · 3 comments
Closed

shell.exec does not recognize 'webpack' #781

sriyan opened this issue Oct 12, 2017 · 3 comments
Assignees
Labels
question Question from a user (which may not require code/documentation changes to the project)

Comments

@sriyan
Copy link

sriyan commented Oct 12, 2017

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');
}
@nfischer
Copy link
Member

Check shell.env.PATH?

If webpack lives inside your node_modules/ folder, make sure that you take a look at our FAQ.

@nfischer nfischer added the question Question from a user (which may not require code/documentation changes to the project) label Oct 12, 2017
@nfischer nfischer self-assigned this Oct 12, 2017
@sriyan
Copy link
Author

sriyan commented Oct 12, 2017

Thanks, @nfischer. FAQ did the trick.

@nfischer
Copy link
Member

Glad it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question from a user (which may not require code/documentation changes to the project)
Projects
None yet
Development

No branches or pull requests

2 participants