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

npm install not working when I use deployment tag

gabrielbusarello September 11, 2019

Hi,

When I use the deployment tag, in my yml file.

The npm install not works.

step:
name: Development Build and Deployment
deployment: staging
caches:
node
#trigger: manual
script:
npm install
     
npm install -g @angular/cli@7.3.8
ng build
scp -r dist/ $SITES_USER@$SITES_IP:$PATH

 The code above, not works, when the pipeline run, throws the error: bash: npm: command not found.

When I take off the deployment, like that:

- step:
name: Development Build and Deployment
caches:
- node
#trigger: manual
script:
- npm install
      - npm install -g @angular/cli@7.3.8
- ng build
- scp -r dist/ $SITES_USER@$SITES_IP:$PATH

The code above, works. 

How to make the pipeline with deployment works?

1 answer

1 accepted

0 votes
Answer accepted
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 18, 2019

Hi @gabrielbusarello,

I've tried to reproduce this scenario but I didn't get any error when the tag is there.
I'm afraid there is an extra detail we are missing that could be causing this behavior.

Do you have any special docker image in your pipeline configuration?

gabrielbusarello September 19, 2019

Hi @Daniel Santos,
The problem has solved.
In pipeline exists a environment variable called PATH, and that variable, is of the linux system, because of that, the problem occurs.

 

Thanks for reply!

Like Daniel Santos likes this
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 19, 2019

Thank you for sharing.
I'm glad to know you found out what was the issue.

Have a good one!

Like gabrielbusarello likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events