Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Pipeline failed caused by npm command not found error

The last week my pipeline works fine, but yesterday it failed caused of npm not found error. The pipeline was not changed since the last time it works well.


I also tried default docker image and other versions of node images, but all get the same error. 

I even tried "which npm"  and got "bash: npm: command not found", seems no command is available.

1 answer

1 accepted

0 votes
Answer accepted

Hi @Liu Nanbing and welcome to the community.

I see in your yml file that you are using a variable named PATH. Have you defined that as a workspace, repository, or deployment variable?

If so, I believe this may be the reason for the errors you are seeing. $PATH is an environment variable which the shell uses to find commands, and any workspace, repository, or deployment variable with the same name will override it.

Could you please try renaming the variable you have defined with this name to something else, e.g. REMOTE_PATH, (change the name both in the definition and also in your yml file), and let me know if this solves the issue?

Kind regards,

Thanks, @Theodora Boudale,  it solved my problem.

Like Theodora Boudale likes this

You're welcome @Liu Nanbing and thanks for the update, good to hear that this is resolved.

Please feel free to reach out if you ever need anything else!

Kind regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

⭐ Calling all Bitbucket and DevOps experts: Special showcase opportunity ⭐

Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...

1,514 views 4 8
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