climate icon indicating copy to clipboard operation
climate copied to clipboard

support for nvm

Open lholznagel opened this issue 9 years ago • 7 comments

Hey, I just tried to install this script. During the installation progress it showed me that npm is not installed. But I have npm installed using nvm (https://github.com/creationix/nvm) Running node -v and npm -v gives from both the version back.

Would be awesome if the script recognises this.

Have a nice day :)

lholznagel avatar Dec 04 '16 13:12 lholznagel

Huh, that's weird. Can you try running type "npm" and post the output here? If it's empty, that'd explain this (but it shouldn't be empty however).

adtac avatar Dec 05 '16 07:12 adtac

Ah, I looked yesterday into the code and tried to use type "npm". The result was empty.

But typing type pip was also empty, which was indicated as installed. But maybe this is because I forgot the quotes.

lholznagel avatar Dec 05 '16 07:12 lholznagel

Can you try which pip and which npm? If those work, then I can change the command_exists function to use which if type doesn't return a result (but we'd still use type first because it's supposed to be faster).

adtac avatar Dec 07 '16 10:12 adtac

On my Laptop both commands work. Will try later at home if it also works there.

lholznagel avatar Dec 07 '16 10:12 lholznagel

Sorry for the long delay. Using which works on my home machine as well

lholznagel avatar Dec 09 '16 15:12 lholznagel

neat, I'll make a patch soon :+1:

adtac avatar Dec 09 '16 15:12 adtac

was this patch made? I faced similar problem today, getting • node missing. Installing... while node is installed through nvm

➜  ~ node -v      
v6.11.0
➜  ~ npm --version
5.0.4

➜  ~ type node
node is /home/pshkrjshnde/.nvm/versions/node/v6.11.0/bin/node
➜  ~ type npm
npm is /home/pshkrjshnde/.nvm/versions/node/v6.11.0/bin/npm

➜  ~ which node
/home/pshkrjshnde/.nvm/versions/node/v6.11.0/bin/node
➜  ~ which npm
/home/pshkrjshnde/.nvm/versions/node/v6.11.0/bin/npm

ghost avatar Jul 01 '17 18:07 ghost