Error saying Failed to find required executable npm in paths

0 votes

My ansible version:

ansible 2.5.0

When I run the playbook against "local" this works just fine, but if run from as remote using ssh, it fails and gives the following error:

Failed to find required executable npm in paths
Playbook:
- name: installing node
  homebrew:
    name: node
    state: present
    update_homebrew: yes

- name: Install appium from npm (always up to date)
  npm:
    name: appium
    state: latest
    global: yes
Jan 10, 2019 in Ansible by Thomas
2,889 views

1 answer to this question.

0 votes

Hey @Thomas, 

Seems like those extra paths have been configured in config files which are only readable by the interactive shell.

There's "path_helper" in Mac OS which is called on /etc/profile and seems to read /etc/paths and/or /etc/paths.d to set PATH properly but when running from an interactive non-login (or non interactive) shell /etc/profile is not sourced and that's why the PATH is different and hence the error. 

answered Jan 10, 2019 by Naina

Related Questions In Ansible

0 votes
1 answer

Error saying "Failed to find required executable gpg in paths"

Hey @Nisha, according to your error, your ...READ MORE

answered Mar 13, 2019 in Ansible by Yesha
11,082 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,003 views
+2 votes
1 answer
0 votes
1 answer

Error saying "Invalid input (privileged mode required)" - Ansible

The task that generated this error requires to enable mode ...READ MORE

answered Mar 6, 2019 in Ansible by Yogesh
1,914 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP