jonnyzzz / TeamCity.Node

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

Grunt fails on Windows #30

Open aschearer opened 11 years ago

aschearer commented 11 years ago
  1. Install TeamCity on Windows
  2. Add build step to run npm install for working directory
  3. Add build step to run grunt from working directory

Expected: Grunt completes successfully Observed: Error: 'C:\Program' is not recognized as an internal or external command

I believe the problem is due to the space in the working directory's path. It is currently under C:\Program Files\TeamCity\buildAgent\work\... The command which fails is:

cmd /c "C:\Program Files\TeamCity\buildAgent\work..."

I believe the fix is to wrap the path in additional quotes:

cmd /c ""C:\Program Files\TeamCity\buildAgent\work...""

See: http://stackoverflow.com/questions/12891383/correct-quoting-for-cmd-exe-for-multiple-arguments

betrayedjinn commented 9 years ago

Still not fixed. :-1:

jonnyzzz commented 9 years ago

Have someone tried to move build agent to a path without spaces? Does it help? Is it the error from grunt or from build agent / TeamCity.Node plugin?

betrayedjinn commented 9 years ago

Happens with gulp build task aswell. Path without spaces would help but using command line runner is the easiest fix.

dylanjmcdonald commented 8 years ago

@paranoxx How do you have your command line runner set up? I have gulp installed globally on the agent and on the project through an NPM install step, but I still get "'gulp' is not recognized as an internal or external command." whenever it reaches my Gulp step.

EDIT: Figured out the issue. TC agent was running on the system account. I had to add my npm user path to the systems Path environment variable.