This answer has the fix.
Sorry this is an extremely late response but I wrestled with the same issue and I thought I was going mad.
Essentially Capistrano doesn't load the full .bashrc
file, so it doesn't have the actual server's version of node inside $PATH
. You need to move your "export PATH" statements in .bashrc
to above the bit that stops it running if it's a non-interactive environment (which is what Capistrano uses). The linked answers explain it better with examples.