TeamCity build runner not recognizing executable

后端 未结 8 1497
悲哀的现实
悲哀的现实 2020-12-25 13:12

I\'m trying to run a simple gruntfile.js as part of my build in TeamCity. However, even after installing grunt and grunt-cli as global node packages, TeamCity s

8条回答
  •  囚心锁ツ
    2020-12-25 13:48

    I couldn't get the accepted solution to work. The problem for me was that TeamCity services (server and agent) were running under system accounts. AFAIK, there is no concept of "globally install npm package for all users of the OS". So I:

    1. created a TeamCity windows user
    2. changed the TeamCity services to run as that user
    3. logged into the OS as the TeamCity user
    4. ran npm install -g grunt-cli
    5. restarted the services.

    From there, the NodeJS, NPM and Grunt tasks just started working.

提交回复
热议问题