bash: npm: command not found

Emre Erinç January 5, 2022

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 5, 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

Emre Erinç January 5, 2022

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
AUG Leaders

Atlassian Community Events