[FIXED] NPM Bamboo task can't find package.json because of wrong dir


My npm task yields the following thing in the logs:

npm WARN ENOENT ENOENT: no such file or directory, open '/home/bamboo/xml-data/build-dir/{name of project-plan-job}/package.json'

Therefore Sails.js doesn’t get installed and the Node.js task tells me that I can’t run the Node app.

Now, I guess this happens because of the directory hierarchy. The repository is structures as follows: repo-root/app/package.json, whereas usually the .json file is directly under the repo root dir.
Do I have to configure the Source Code Checkout task in some specific way?


Set sub-directory as /home/bamboo/xml-data/build-dir/{name of project-plan-job}/ in the Bamboo stage.

Answered By – Kumar Vaibhav

Answer Checked By – Willingham (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published