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
Missing node
in spawn command on windows
#9
Comments
I have same error. I was trying to change this line to «command = 'node ./' + [@path.join rootPath, gruntPath]» — error message disappears, all tests passed, but actually no grunt task ran in docpad. @Bartvds, how did you fix that? Can you make pull-request? |
@InterPaul I never solved it, instead I used another pattern: instead of calling grunt from docpad I run docpad from grunt, is a lot more convenient. |
Thanks @Bartvds, I'll try the same way |
Instead
should be
|
@InterPaul Thanks for the pull request 👍 . Merged. Working now? |
@RobLoach No, with |
@RobLoach any updates? |
@InterPaul Passing on Linux, where does it break on Windows? |
Compiled plugin from your current master branch and checked it on my repository. There is no more error but no grunt task was executed. See also Update: Hope that helps. |
Plugin still not working on Windows |
I use own working build. "docpad-plugin-grunt": "git://github.com/interpaul/docpad-plugin-grunt.git#v211compiled" |
Hmm, interesting.... But when you see https://github.com/RobLoach/docpad-plugin-grunt/blob/master/src/grunt.plugin.coffee#L55 , there is already the 'node' prefix. Know what's going on? |
Actually no. |
@InterPaul Which version of node is it? |
v0.12.7 |
Do the tests pass for you on Windows?
|
Test failed. Final output: coffee compile:
C:\Program Files\nodejs\node.exe c:\GitHub\docpad-plugin-grunt\node_modules\.bin
\coffee -co out src
c:\GitHub\docpad-plugin-grunt\node_modules\.bin\coffee:2
basedir=`dirname "$0"`
^
SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3 |
Thanks for posting these movies 👍 . Quite helpful in debugging. What software are you using for them? Unexpected token ILLEGAL is an interesting one, since it is CoffeeScript. Where is basedir= represented? I can't find it in my source. |
LICEcap for screen to gif. Works both on Windows and MacOS. As for basedir — I don't know, I'm just designer. |
When I use this plugin I get this error:
So I looked into the code, and this line needs a 'node' command to work (as the shebang does nothing on windows):
https://github.com/RobLoach/docpad-plugin-grunt/blob/master/src/grunt.plugin.coffee#L52
Then it works as expected.
(well, small detail: it needs an extra newline: the 'Running "xyz" task' message gets appended to the progress bar's line:
The text was updated successfully, but these errors were encountered: