javascript - Node.js/Gulp: child process spawn 'Error: spawn EACCES' -


i trying build , run executable in gulp using node. executable builds fine, attempting run gives error:

error: spawn eacces @ exports._errnoexception (util.js:1023:11) @ childprocess.spawn (internal/child_process.js:313:11) @ object.exports.spawn (child_process.js:387:9) @ gulp. (/path/to/my/app/gulpfile.js:167:24) @ module.exports (/path/to/my/app/node_modules/orchestrator/lib/runtask.js:34:7) @ gulp.orchestrator._runtask (/path/to/my/app/node_modules/orchestrator/index.js:273:3) @ gulp.orchestrator._runstep (/path/to/my/app/node_modules/orchestrator/index.js:214:10) @ gulp.orchestrator.start (/path/to/my/app/node_modules/orchestrator/index.js:134:8) @ gulp. (/path/to/my/app/node_modules/gulp-sync/lib/index.js:51:27) @ module.exports (/path/to/my/app/node_modules/orchestrator/lib/runtask.js:34:7)

bear in mind script works fine when gulpfile.js in same directory executable attempting run.

but have moved gulpfile.js 1 directory down, , in order build/run executable have change cwd of child process spawning directory above it. in doing so, though executable still builds fine, running of keeps giving me error , can't find online.

i tried set executable permissions on file, thinking permissions problem, didn't anything.

i tried putting logic run executable in shell script , run shell script using child process instead (cause why not), didn't either.

here's code:

// spawn application server if (os.platform() === 'win32') {     // server = child.spawn(appname + '.exe') <-- used work     server = child.spawn(appname + '.exe', [], {         cwd: maindotgopath     }); } else {     // server = child.spawn('./' + appname) <-- used work     server = child.spawn('./' + appname, [], {         cwd: maindotgopath     }); } 

the path fine, way, because build executable using similar syntax , builds fine:

var build = child.spawnsync('go', ['build'], {     cwd: maindotgopath }); 

anyone have ideas?


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -