jonnyzzz / TeamCity.Node

Node.js, NPM and Phantom.JS runners for TeamCity
Apache License 2.0
309 stars 49 forks source link

System wide grunt not detected #70

Open Waxolunist opened 9 years ago

Waxolunist commented 9 years ago

System wide grunt is not detected on the build agent, though it is installed.

I think the problem is that the output of grunt-cli changed somewhat.

Instead of

$ grunt --version
grunt-cli v0.1.13

the output is

$ grunt
grunt-cli: The grunt command line interface. (v0.1.13)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:

http://gruntjs.com/getting-started

The test executes the second but looks out for the first output.

jonnyzzz commented 9 years ago

On what OS does the build agent fails to detect grunt? What version of packages do you have?

jonnyzzz commented 9 years ago

Unfortunately, I failed to reproduce the bug under Mac OS. The related code is in NodeDetector.kt file. Do you see how one can improve it?

Waxolunist commented 9 years ago

I am using Mac OS as well. I will so some more tests.

neillturner commented 9 years ago

I'm getting this problem NodeDetector.kt need to change from

detectNodeTool("grunt", GruntBean().gruntConfigurationParameter) {

detectNodeTool("grunt --version", GruntBean().gruntConfigurationParameter) {

as suggested above

neillturner commented 9 years ago

weirdly this problem happens when I run Java 8. I don't have problem with Java 7......

jonnyzzz commented 9 years ago

You may check environment variables. It may caused a package to disappear On Aug 26, 2015 6:49 PM, "Neill Turner" notifications@github.com wrote:

weirdly this problem happens when I run Java 8. I don't have problem with Java 7......

— Reply to this email directly or view it on GitHub https://github.com/jonnyzzz/TeamCity.Node/issues/70#issuecomment-135105669 .

GlennPiper commented 7 years ago

It appears that this issue has been "resolved" in code, but I was still seeing an issue with grunt not being reported. In my case, my issue was that I was running the agent under the System account in Windows, and grunt-cli was installed globally under my account. I tried getting it installed under the system account (other postings on the web indicated this worked) but it failed for me. I eventually set up the agent to run under its own account, installed grunt-cli under this account, and all was peachy!