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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,466,389
Community Members
 
Community Events
176
Community Groups

Pipelines npm not found

I'm trying to run a pipeline that runs an npm build, but I keep getting an `npm not found` error. Here is my bitbucket-pipelines.yml file (please excuse the formatting)

image: node:14.16.0

pipelines:
tags:
'*.*.*':
- step :
name : "Build"
deployment: production
script :
- npm install
- npm run build
artifacts:
- dist/**
- step:
name: RSYNC To Server
script:
- pipe: atlassian/rsync-deploy:0.7.1
variables:
USER: $SSH_USER
SERVER: $SSH_IP
REMOTE_PATH: $PATH
LOCAL_PATH: './dist'
DEBUG: 'true'
EXTRA_ARGS: '-avzq --delete --links --exclude-from=rsync_exclude.txt'
 

 

Here is the log file, if it helps. 

+ umask 000

+ GIT_LFS_SKIP_SMUDGE=1 retry 6 git clone --branch="main" --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into '/opt/atlassian/pipelines/agent/build'...

+ git reset --hard 7ed763c53d5f5de117d3b6297b6eaaa9204b5d5c
HEAD is now at 7ed763c try atlassian default

+ git config user.name bitbucket-pipelines

+ git config user.email commits-noreply@bitbucket.org

+ git config push.default current

+ git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/

+ git remote set-url origin http://bitbucket.org/$BITBUCKET_REPO_FULL_NAME

+ git reflog expire --expire=all --all

+ echo ".bitbucket/pipelines/generated" >> .git/info/exclude

+ chmod 777 $BUILD_DIR

Images used:
build : docker.io/atlassian/default-image@sha256:edf4bd880adf9e7f7677094f7a1d944524c7f98e939550bc152523c5cf6080ff
bash: lesspipe: command not found
bash: dircolors: command not found
+ npm install
bash: npm: command not found
bash: lesspipe: command not found
bash: dircolors: command not found
Searching for files matching artifact pattern dist/**

Searching for test report files in directories named [test-results, failsafe-reports, test-reports, TestResults, surefire-reports] down to a depth of 4
Finished scanning for test reports. Found 0 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.

I've run it through the pipelines validator and it passes as valid. I'm not sure what I'm missing or if something is going wrong in the pipeline itself. Thanks for any help you can provide.  

1 answer

1 accepted

0 votes
Answer accepted

Ugh. I found the issue. I had an ENV VAR named PATH, which broke everything.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events