I have a build Plan that I want to have execute a Grunt task.
The server has Node and Grunt installed and will successfully run the Grunt task from the command line ("grunt default"). However when I add this as a Script task to Bamboo I get the following error:
'node' is not recognized as an internal or external command,
operable program or batch file.
Previously it was throwing the same error but with 'grunt' instead of 'node' but I managed to resolve this by forcing Grunt CLI to install in a previous task using 'npm'.
Bamboo is configured with a Server Capability for the Node.exe and I have installed the NodeJS Bamboo plugin.
I have also restarted the Bamboo service so that it will run under the Administrator user (which is the user I ran the successful build under) but with no luck
Has anyone any ideas how to get this resolved?
You'll need to make sure that node js is in the path for the user that starts up the jvm running the builds (if you're on remote agents - the remote agent - if it's a local agent - make sure it's in the webapp's path). Otherwise you'll need to either set the path in the script task, point to it absolutley or specify the bamboo capability in the path so it gets replaces whenever the task is run.
Thanks for your reply! It is running as a local agent - how do I check (and set) the webapp's path?
I have tried to investigate by adding "path >> path.txt" to the Script task that runs the Grunt job but it only displays the npm path, which suggests that this is where the problem lies. However, I've been unable to find a way to update it.
I have tried adding the following command setx path "%path%;c:\Program Files (x86)\nodejs\" to the Script task but it fails to recognise the setx command.
Is there a way to explicitly tell Grunt where to find node.exe?
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs