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

npm: command not found Edited

Hi. I have some troubles with bitbucket pipeline. I enabled pipeline. Added yml script (see attachment).

Run build. Build was success, but now I has an error "npm: command not found"

Could you help me with it please?

yml file content:

# This is a sample build configuration for Javascript (Node.js).
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: node:6.9.4

pipelines:
  default:
    - step:
        script: # Modify the commands below to build your repository.
          - npm install

 

2 comments

Leo Creer I'm New Here Nov 12, 2018

I am having same issue

I had to add the the registry with the auth token in the .npmrc and .NPMRC_CONFIG. I don't know if both were required, but I did it that way and am not messing with it. 

//registry.npmjs.org/:_authToken=${NPM_TOKEN}

Explained here: https://confluence.atlassian.com/bitbucket/javascript-node-js-with-bitbucket-pipelines-873891287.html 

Comment

Log in or Sign up to comment
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

985 views 1 16
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you