-
Notifications
You must be signed in to change notification settings - Fork 22
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
Spawn errors ENOENT when using options.base to specify custom Gruntfile.js location #31
Comments
+1 |
+1, for me too.. |
Don't have a fix for this, but I do have a workaround. There is a grunt plugin called grunt-hub, whose purpose is to load and run tasks in grunt files that are in child folders/projects. I was able to leverage this plugin to get around this error. first, setup gulp-grunt in your gulpfile with no "base" option (you can specify other options if you want) ...
This will look for a gruntfile in the same folder with your gulpfile. So, we create a gruntfile there that uses grunt-hub, and configure it to look for the child gruntfile that you need to run, and register tasks to run specific hub targets.
Finally, back in your gulp file, use gulp-grunt like normal to use the tasks you created in your new gruntfile (which will in turn use hub to run the grunt tasks in the file further down in the directory tree).
It's not optimal, but it works. Hope this helps. It worked for me. |
+1 |
Hi there,
As a few have pointed out already, in your documentation it says that setting
options.base
will be used for specifying a custom Gruntfile.js location. However, in the code it is being used as the path to the grunt executable. This is causing ENOENT errors because it is trying to spawn from an invalid location. (Since the grunt executable would not likely exist in the same directory as the Gruntfile, its either globally installed/usr/bin
(etc) and on the PATH, or whengrunt-cli
is a dependency it would be innode_modules/.bin
)A solution would be to have two separate options for the Gruntfile location and the grunt executable
As a side note, the mocha tests are not picking this error up because it seems that the overriding of
process.stdout.write
is having the side effect of squelching the failing tests.The text was updated successfully, but these errors were encountered: