Reputation: 5436
npm config set prefix '~/.npm-packages
~/.profile
I have PATH="$HOME/.npm-packages/bin:$PATH"
npm install -g gulp
, verifying that it exists in ~/.npm-packages/bin/gulp
gulp
I'm using the following Ansible task:
name: Run gulp
command: gulp
args:
chdir: app/
but it always errors out with the following:
{"cmd": "gulp", "failed": true, "rc": 2}
msg: [Errno 2] No such file or directory
Why am I able to run gulp
from a SSH session but not via Ansible?
Upvotes: 1
Views: 3041
Reputation: 5436
I was finally able to do this with the following.
- name: Run gulp
command: ~/.npm-packages/bin/gulp
args:
chdir: app/
Upvotes: 4