lando/hyperdrive

Allow opt-out of Node install, or optional userland install version (nodenv)

Closed this issue · 3 comments

Is your feature request related to a problem? Please describe.
Installation of mainline node via the system package manager installs Node and NPM admin/sudo style which can cause some headaches when trying to globally install NPM dependencies. In some cases, even using sudo to run npm, things won't install correctly. It is very common to move Node, Ruby, Python, etc into the userland space so that packages are installed as the user and not root and therefore they are much less likely to run into these kind of issues. I personally prefer nodenv for installing Node as it also makes switching node versions very easy and I have never once run into this issue while using it. A simple solution would probably be a --no-node flag so I can just skip the hassle and install my own node.

Describe the solution you'd like

  1. Swap the global node install for installation of a node manager like nodenv or
  2. Allow for opt out of node install so that one can choose a less painful install method

Describe alternatives you've considered
two alternatives listed ablve

Additional context
https://github.com/dustinleblanc/tandemonium/blob/master/phoenix_down#L107 example method for install of nodenv in script

Just found this as a potential alternative solution https://www.competa.com/blog/how-to-run-npm-without-sudo/

pirog commented

@dustinleblanc i think its usually up to the user to set up the global install directory correctly. We can potentially aid that process a few different ways
https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally

I think it would be much better, simpler, easier to do something like that than introduce higher order complexity with something like nodeenv

I definitely agree we should allow users to disable arbitrary components though and spun up an issue for that
#6

@pirog yeah step one I think is opt-out-ability, step two is maybe the handling of global install directories in userland, and then we can probably drop the idea of nodenv altogether (though it does help with seamless version changes)