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

This widget could not be displayed.

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 Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,345 views 8 11
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