Running shell command with a Script task not in place

I want to run the command npm run myScript within my built plan, with an Inline Script task, but I'm getting an error that npm was not found:

/mnt/data/bamboo-home/temp/ 1: /mnt/data/bamboo-home/temp/ npm: not found

When on localhost, I need to be within the /app directory in my project, in order to run npm commands. Apparently Bamboo puts the script in a temporary folder, outside of the project, thus npm is not found. Do you know how to overcome this issue?

This is the configuration of the task:

Screen Shot 2016-12-29 at 12.32.56.png

1 answer

This widget could not be displayed.


Just so you know there is a npm task available which you can use to run the npm tasks.

But for your question: you need to tell bamboo where your node is installed. I have definied a variable as npm and this is how I use if I want to use it in inline script







script :

 ${bamboo.npm} run init-test-db


You can do this or directly write those values in script

That should work!


image2016-12-29 9:29:38.png

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

79 views 0 1
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you