Closed CodeForCoffee closed 7 years ago
Quoting the repository README:
IMPORTANT: This repository is no longer maintained.
The same feature is now built-in with node v0.12: >https://nodejs.org/api/child_process.html#child_process_child_process_execsync_command_options
OS: Windows Server 2008 x64 R2 or Windows 7 Ultimate x64. Tools: Final Builder, Jenkins, cygwin node v0.8.11 npm 1.1.62 grunt-steal grunt-imagine grunt-beautify grunt-cleanx
My intent is to create a build script for Continuous Integration purposes. But no matter what I try I'm running into this "Error: ENOENT, no such file or directory '%GUID_LIKE_NUM%.stdout' But only when I try running grunt from another application. Let me explain.
So I install node, grunt and a few various grunt components (steal, imagine, beautify, cleanx). And I run grunt on the windows command line, and it works perfectly. So I take it to the next step and add it to a build script to be run whenever the a hook is triggered. Then all hell breaks loose. Now I first blamed the tools I was using and went through their forums, and direct support system. Along with trying a lot of different configurations myself. But the gist of the problem is that grunt is not handling being piped through cmd properly.
Both FB and Jenkins basically create a wrapper bat file. i.e. cmd /c call %GUID%.bat With my script ci_grunt.bat being as simply as I can make it.: grunt.cmd %1 (it's being called from the working directory)
Anyways I'm getting error logs like this:
C:\Projects\trunk\MMWebHTML\mj\viewer>grunt.cmd [4mRunning "gloablize" task[24m Error: ENOENT, no such file or directory 'C:\Users\BUILD~1.MIN\AppData\Local\Temp\2\tmp1349893925353005205364874564111.stdout' at Object.fs.openSync (fs.js:338:18) at Object.fs.readFileSync (fs.js:182:15) at getOutput (C:\Projects\trunk\MMWebHTML\mj\viewer\node_modules\grunt-steal\node_modules\exec-sync\bin\index.js:39:17) at module.exports (C:\Projects\trunk\MMWebHTML\mj\viewer\node_modules\grunt-steal\node_modules\exec-sync\bin\index.js:59:14) at Object.module.exports (C:\Projects\trunk\MMWebHTML\mj\viewer\node_modules\grunt-steal\tasks\steal.js:31:20) at Object.task.registerTask.thisTask.fn (C:\Users\build.DOMAIN\AppData\Roaming\npm\node_modules\grunt\lib\grunt\task.js:58:16) at Task. (C:\Users\build.DOMAIN\AppData\Roaming\npm\node_modules\grunt\lib\util\task.js:341:36) at Task. (C:\Users\build.DOMAIN\AppData\Roaming\npm\node_modules\grunt\lib\util\task.js:317:9) at Task. (C:\Users\build.DOMAIN\AppData\Roaming\npm\node_modules\grunt\lib\util\task.js:344:11) at Task. (C:\Users\build.DOMAIN\AppData\Roaming\npm\node_modules\grunt\lib\util\task.js:317:9) Program returned code : 1
Also I tried it in Cygwin, to similar results:
$ grunt.cmd Running "gloablize" task
Error: ENOENT, no such file or directory 'C:\cygwin\tmp\tmp135069160198400632470 6578161567.stdout' at Object.fs.openSync (fs.js:338:18) at Object.fs.readFileSync (fs.js:182:15) at getOutput (C:\Projects\trunk\MMWebHTML\mj\viewer\node_modules\grunt-steal \node_modules\exec-sync\bin\index.js:39:17) at module.exports (C:\Projects\trunk\MMWebHTML\mj\viewer\node_modules\grunt- steal\node_modules\exec-sync\bin\index.js:59:14) at Object.module.exports (C:\Projects\trunk\MMWebHTML\mj\viewer\node_modules \grunt-steal\tasks\steal.js:31:20) at Object.task.registerTask.thisTask.fn (C:\Users\build.DOMAIN\AppData\Ro aming\npm\node_modules\grunt\lib\grunt\task.js:58:16) at Task. (C:\Users\build.DOMAIN\AppData\Roaming\npm\node_modul es\grunt\lib\util\task.js:341:36) at Task. (C:\Users\build.DOMAIN\AppData\Roaming\npm\node_modul es\grunt\lib\util\task.js:317:9) at Task. (C:\Users\build.DOMAIN\AppData\Roaming\npm\node_modul es\grunt\lib\util\task.js:344:11) at Task. (C:\Users\build.DOMAIN\AppData\Roaming\npm\node_modul es\grunt\lib\util\task.js:317:9)