callerc1 / shipit-npm

Npm tasks for shipit.
MIT License
21 stars 13 forks source link

doesn't work in remote with nvm #12

Open Yvem opened 8 years ago

Yvem commented 8 years ago
Running 'npm:install' task...
Installing npm modules.
Running "node -v && cd /home/xyz/work/tmp/shipit-deploy-to/releases/20151126131253 && npm i npm-pkgr -g" on host "localhost".
@localhost-err bash: node: command not found
Error: Command failed: /bin/sh -c ssh xyz@localhost "node -v && cd /home/yej/work/tmp/shipit-deploy-to/releases/20151126131253 && npm i npm-pkgr -g"
bash: node: command not found

should have an option to run nvm use default before running npm

using shipit-nvm doesn't help.

phaibin commented 8 years ago

+1

pcriv commented 8 years ago

+1

kbucksch commented 8 years ago

+1

delusive commented 8 years ago

I got it going based on this answer:

https://github.com/shipitjs/shipit/issues/117#issuecomment-198164658

You need to make sure (if your using a .bashrc) that the NVM initialization is above the following in your .bashrc file.

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac
travco commented 8 years ago

@Yvem In my opinion this is more of an environment issue than a shipit-npm issue, is delusive's answer satisfactory for you?

I would agree with you if there weren't such a myriad of ways to install node, putting an option to cover all of them might be a heck of a ongoing task.

ketansp commented 8 years ago

+1