Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Unable to find executable at &('ROOT\bamboo-home\temp\ScriptBuildTask.ps1)

hi, i actually want to run nodejs script, for that i needed to run npm first. now npm shows error of not having scriptTask.ps1. 

Entire error is something like:

Unable to find executable at &('ROOT\bamboo-home\temp\HKPROJ-HKPLAN-JOB1-9-ScriptBuildTask-2242666093943315694.ps1'). Will try to run it anyway.

Can anyone help me knowing what is ps1 file and what does it do? and how can i add one into this directory.

1 answer

0 votes

Hi @aneesha_kumari,

Thanks for your question and welcome here in Community!

Indeed, npm and Node .js are bundled. That said, once you install Node.js, e.g. from nodejs.org, you can type node -v or npm -v on command-line and should see the installed versions of both as an output.

Prior to use npm, you first need to run command npm init which creates a folder node_modules from the directory where you call the command, typically your local Node.js project folder, and file packet.json which contains the basic information that you entered interactively when running npm init and also sections like "scripts" and "dependencies".

Without that, npm should not work.

Next, did you try to run npm from outside Bamboo, precisely speaking on the sever Bamboo Server is installed and runs on? It's always good to figure out if things can really get executed the way they are set up. Note that if you cannot run something like e.g. npm install moment where moment is just an example of a Node.js module for date and time formatting on command-line on your Bamboo host, Bamboo cannot run it too. If so, you should troubleshoot the issue outside Bamboo first.

Now let me assume that thus far everything is correct. From the type of error you get, it looks like you're trying to run npm install, npm test or any other npm command from out of as Bamboo Script task and your Bamboo host seems to be a Windows server since whatever you try to launch there kicks off a PowerShell (PS) script.

And here I believe that the error message is a bit misleading. The error should not be related to the PS script itself, I rather think that the npm executable as such cannot be found.

To resolve that you first need to determine where you installed Node.js. And with that in mind, you need to set either Bamboo's Server, agent-speficic or shared capability accordingly. Other than this, the environment variable NODE_HOME needs to be set, with exactly the same value as the Node.js capability before. This is where Bamboo primarily looks for the node and npm binaries!

Please find details in the following KB Getting started with Node.js and Bamboo especially in section "Node.js capability".

On a side-note, for running npm as well as Node.js, Bamboo offers dedicated tasks. Please take a look into the above KB for this too. It should me more practical using those instead of Bamboo Script tasks. Note that for both of these to work, the Node.js executable capability needs to be set properly too.

Hope that helps. Take care and let us know what more we can do for you.

Thanks, Gerhard

Suggest an answer

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

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

474 views 5 7
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