Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

'node' not found when running Grunt task in Bamboo

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?

Thanks, Stuart

2 answers

1 accepted

1 vote
Answer accepted

If anyone finds this, I had the same issue and fixed it by simply copying the entire path variable from environment variables into the Environment variables text box in the node.exe task in the build.

0 votes
Daniel Wester Community Leader Jan 04, 2014

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?

Thanks, Stuart

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

223 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you