Friday 5 May 2017

Exec equivalent in Windows to run gulp task with a child Process

I'm trying to execute a gulp task in windows, but it doesn't work .And it works in Linux.

var exec = require('child_process').exec;

gulp.task('lodash', function (callback) {
   exec('node_modules/lodash-cli/bin/lodash -o ./tmp/lodash.custom.js include=' + lodashIncludes.join(','), callback);
});

The Error message :

'node_modules' not recognized as an internal or external module, 
an executable program or command file
    at ChildProcess.exithandler (child_process.js:204:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:886:16)
    at Socket.<anonymous> (internal/child_process.js:342:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:501:12)



via wikimix

No comments:

Post a Comment