Long story here - normally .nvm goes to ~/.nvm
I would like to write .nvm to a different directory. How can I do that?
When I try
HOME=. && curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
NVM still tries to put .nvm in the original $HOME directory.
ha ok this worked
export HOME=. && curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
But I get this:
nvm is not compatible with the npm config "prefix" option: currently set to "/var/lib/openshift/emsa-k76pvx3istg-1/app-root/runtime/repo/.nvm/versions/node/v6.10.0"
Run `nvm use --delete-prefix v6.10.0` to unset it.
I want to use that prefix and it should work as is, why do you think nvm wants me to unset it?
Simply set $NVM_DIR before running the install script - you should not overwrite $HOME.
The npm prefix option is incompatible with nvm because it, not you, manages your node install (as well as where global modules are installed). However, looking at the error, is any part of that path a symlink, or a network mount?
It might be part of a symlink, let me verify that. Sounds good WRT pre-setting $NVM_DIR before installing.
Specifically, $NVM_DIR can't be a symlink.
Why don't you want it inside $HOME?
We cannot put .nvm in $HOME because the stupid production openshift server
at work does not give us those permissions. The only place to put .nvm is
in our source code, sounds crazy but should work.
On Mar 18, 2017 12:05 AM, "Jordan Harband" notifications@github.com wrote:
Specifically, $NVM_DIR can't be a symlink.
Why don't you want it inside $HOME?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/creationix/nvm/issues/1436#issuecomment-287521787,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKn56AtlDvxLU4FnUsxNTEx1ByTX6u-Uks5rm4JEgaJpZM4MhK7g
.
So instead of:
export HOME=${DIRNAME} && curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
we will just do this:
export NVM_DIR=${DIRNAME}/.nvm && curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
Yes, exactly.
ok cool thank you
Most helpful comment
Simply set
$NVM_DIRbefore running the install script - you should not overwrite$HOME.The npm
prefixoption is incompatible withnvmbecause it, not you, manages your node install (as well as where global modules are installed). However, looking at the error, is any part of that path a symlink, or a network mount?