Create
cancel
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

bash: npm: command not found

Edited

Hi,

 

I want to use bitbucket-pipeline for our Vue.Js app app to our AWS server. But it is always gives an error about 'npm: command not found'. I tried so many combination of commands and node images that used in pipeline but it does not help to fix our problem. I did not get it where is problem. 

 

Here is our bitbucket-pipeline.yml

image: node:16

pipelines:
branches:
develop:
- step:
name: Build
script:
- npm install
- npx vue-cli-service build --mode production
caches:
- node
artifacts:
- dist/*
- dist/**/*
- dist/**/**
- step:
name: Deploy
script:
- scp -r ./dist ubuntu@$SERVER:/var/www/path/to/app

 

Here is screenshot of error:

pipeline-error.png

 

Thanks.

 

----------------------------------------------

Edit:

Fixed issue when I remove custom path variable called as PATH from repo settings. It is causing confusion of pipeline. 

 

https://jira.atlassian.com/browse/BCLOUD-20162

 

Thanks.

1 answer

0 votes
Pramodh M Community Leader Jan 05, 2022

Hi @Emre Erinç 

Try with this simple syntax and check whether you are able to run the workflow.

https://support.atlassian.com/bitbucket-cloud/docs/javascript-nodejs-with-bitbucket-pipelines

Thanks,
Pramodh

Hi, 

I guess, these errors are depends to workflow. Even this pipeline did not work.

 

node-error.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

531 views 1 9
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