Milkncookiez
Milkncookiez

Reputation: 7397

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?

Upvotes: 3

Views: 1814

Answers (2)

Sagar Sudhakar
Sagar Sudhakar

Reputation: 31

Advanced options -> Working subdirectory -> \FolderName enter image description here

Upvotes: 1

Kumar Vaibhav
Kumar Vaibhav

Reputation: 2642

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

Upvotes: 0

Related Questions