L
L
luxter2018-07-06 17:32:15
Node.js
luxter, 2018-07-06 17:32:15

How to specify the path to package.json when doing npm install?

The bottom line is that there is a playbook (from Bitrix) in Ansible, which executes /usr/bin/npm install --production
The execution slows down, swearing at the absence of package.json
I created it in /root/package.json with the /usr/bin command /npm --init , I start the playbook again, but the error is the same. Ansible itself runs as root, and I thought it should pick it up, but it doesn't. Question: how to specify the explicit location of package.json in the playbook?
I did not find this point in the npm documentation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kiryushka Tsisar, 2018-07-06
@carlcox

The file must be located in the directory from which the command is run.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question