Pipelines with node image: no such file or directory, open '/opt/atlassian/pipelines/agent/build/package.json'

Hi,

I'm experiencing problems when trying to set up pipelines with a node image (first try):

 

...   + npm install npm info it worked if it ends with ok npm info using npm@3.10.3 npm info using node@v6.7.0 [..................] / normalizeTree: sill install loadCurrentTree npm info lifecycle undefined~preinstall: undefined npm info linkStuff !invalid#1 npm info lifecycle undefined~install: undefined [ .] / install:build: info lifecycle undefined~install: undefin npm info lifecycle undefined~postinstall: undefined npm info lifecycle undefined~prepublish: undefined npm WARN enoent ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent/build/package.json'

 

Any idea what could be the reason for missing /opt/atlassian/pipelines/agent/build/package.json?

 

Thanks!

Markus

1 answer

1 accepted

Do you have a file called "package.json" in the root directory of your repository? I'd recommend putting a couple of simple commands at the beginning of your pipeline script to see if your checkout looks correct, eg.

...
      script:
        - pwd
        - ls -al

The output of "pwd" should be

/opt/atlassian/pipelines/agent/build

And the "ls -al" command should include the file "package.json" in its output. 

ah, that is the working dir!

Figured it out now. Thanks a lot, Steven!

PS: pipelines is really a joy to use – once you overcome your own initial blindness smile

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

717 views 0 4
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot