leonidas/ansible-nvm

Where could I find the npm path

TonyWuLihu opened this issue · 1 comments

I found after installed the nvm on ansible, still could not locate the npm bin path ?
tasks:
- name: Install puppeteer and skip the chrome download
npm:
executable: /opt/nvm/v0.10.1/bin/npm
name: puppeteer
ignore_scripts: yes
global: yes
state: present
tags: ['npm_package_management']

And I always got the error
"msg": "[Errno 2] No such file or directory"

Any one knows which location the npm executable has ?

.nvm/vNNN/bin/npm where NNN is the version you want to use in the home folder of whoever installed it. In theory it's supposed to be executable from any location for that user because it's in the .profile/.bashrc but since ansible doesn't load the profile that doesn't really work for me.