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

1 vote
Accepted answer

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 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 ...

425 views 6 9
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