Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Markus Westphal-Furuya October 7, 2016

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

4 votes
Answer accepted
Steven Vaccarella
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 7, 2016

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. 

Markus Westphal-Furuya October 7, 2016

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

bpost roma January 4, 2019

can you share your .yml file?

Like # people like this
Glenn Hand May 30, 2019

I was able to get this working by creating a default package.json file first.  I added an npm init --yes before my npm install

 

My script read like this:

- npm init --yes

- ls -al #checking the package.json exists in current directory

- npm install

Like Alok Jain likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events