I am using bit bucket pipeline for continuous integration.Inside pipeline i am passing "npm install", its throwing me an error "please include the following file with any support request: /opt/atlassian/bitbucketci/agent/build/npm-debug.log". Is their any solution for this.

1 answer

0 votes

Hi Karthik,

I assume you are using the default configuration for Bitbucket Pipelines? And that the full error message looks something like this? smile

+ npm install
npm ERR! install Couldn't read dependencies
npm ERR! Linux 4.4.0-34-generic
npm ERR! argv "/bin/versions/node/v4.2.1/bin/node" "/bin/versions/node/v4.2.1/bin/npm" "install"
npm ERR! node v4.2.1
npm ERR! npm  v2.14.7
npm ERR! path /opt/atlassian/bitbucketci/agent/build/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -2
npm ERR! syscall open

npm ERR! package.json ENOENT: no such file or directory, open '/opt/atlassian/bitbucketci/agent/build/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! Please include the following file with any support request:
npm ERR!     /opt/atlassian/bitbucketci/agent/build/npm-debug.log

+ npm install
npm ERR! install Couldn't read dependencies
npm ERR! Linux 4.4.0-34-generic
npm ERR! argv "/bin/versions/node/v4.2.1/bin/node" "/bin/versions/node/v4.2.1/bin/npm" "install"
npm ERR! node v4.2.1
npm ERR! npm  v2.14.7
npm ERR! path /opt/atlassian/bitbucketci/agent/build/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -2
npm ERR! syscall open

npm ERR! package.json ENOENT: no such file or directory, open '/opt/atlassian/bitbucketci/agent/build/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! Please include the following file with any support request:
npm ERR!     /opt/atlassian/bitbucketci/agent/build/npm-debug.log

I suspect we need to do some additional configuration to get your build set up.

If you would like to confirm Bitbucket Pipelines is working on your repo (without building any of your code yet), try making your bitbucket-pipelines.yml file look like this instead:

# This is a sample build configuration for all languages.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Dockerhub as your build environment.
# image: docker-image:tag

pipelines:
  default:
    - step:
        script:
          - echo "Everything is awesome!"

Can you tell me what programming language (and any other tooling you are using) you are trying to build with Bitbucket Pipelines? I can then give you a more specific response into how to configure your build, depending on the programming language you are using. smile

Thanks for reply, before "npm install" their were some settings to be done inside npm config. Its working for me now.

 

You should put the steps you followed to solve your problem to help those who have the same problem.

This is my   bitbucket-pipelines.yml file.

Before giving npm install , need to add config steps.

This helps in build your code within bit bucket.


pipelines:
default:
- step:
script: # Modify the commands below to build and test your repository.
- npm config set registry "http://registry.npmjs.org"
- npm config set strict-ssl false
- npm install

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

194 views 3 6
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