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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

27,620 views 26 12
Join discussion

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