Package Details: nvm 0.33.8-1

Git Clone URL: https://aur.archlinux.org/nvm.git (read-only)
Package Base: nvm
Description: Node Version Manager - Simple bash script to manage multiple active node.js versions
Upstream URL: https://github.com/creationix/nvm
Licenses: MIT
Submitter: tomwadley
Maintainer: tomwadley
Last Packager: tomwadley
Votes: 66
Popularity: 4.774452
First Submitted: 2015-03-14 21:57
Last Updated: 2017-12-12 22:27

Latest Comments

ljharb commented on 2017-06-01 22:05

@tomwadley Makes sense. I still think nvm itself should be stored in the home directory, but as long as it works, that's fine.

The reality, of course, is that without a second factor on a separate communications channel, the system package manager isn't any more secure than curl | sh :-) no need to get into the "security theater" argument here, of course.

My hope is that this AUR approach won't be like every other attempt before it to package nvm via an unsupported method; but that instead, this one will actually *work* and not cause bugs. So far, there's been few complaints, so congrats!

tomwadley commented on 2017-06-01 18:28

Hi @ljharb,

Firstly, thanks for dropping in and for all of your work on nvm. I (and I'm sure everyone using this package) really appreciates everything you're doing.

To answer your question, if the user follows the instructions, NVM_DIR *is* actually set to $HOME/.nvm. It's only that nvm itself is put in /usr/share.

To elaborate a little more, this package is for people, like me, who prefer to have all of their installed software managed by their system package manager rather than installing things with a curl-pipe-bash. A lot of people also prefer not to have a script (such as your install.sh) making changes directly to files in their home directory. The philosophy behind install.sh doesn't sit well with me and I wanted to be able to install nvm without using it.

Of course, the fundamental design of nvm is that its a sourced shell function which makes it difficult to package as though it were a normal system executable. It is unfortunate that even with this AUR package, users must still edit their personal .bashrc files. But if this is necessary, I believe Arch users would prefer to do that by hand.

ljharb commented on 2017-06-01 06:40

Hi, http://nvm.sh / https://github.com/creationix/nvm/ maintainer here.

@lwin please file an issue on the upstream repo; slowness is generally due to `npm config get prefix` being slow.

@lacrymology you're using an old/never worked properly `nvm` that was incorrectly installed from `npm`. `npm uninstall -g nvm`, and then please reinstall it properly (from the install script, or this AUR package).

@rulatir nvm is a sourced shell function - there is no binary, no executable. When you source `nvm.sh`, you'll get an `nvm` function available in your shell.

@tomwadley is there a particular reason that this installs $NVM_DIR to a non-user-specific place? nvm is per-user, and should not be shared across user accounts.

In general to everyone, please start by filing an issue on the git repo directly - https://github.com/creationix/nvm/issues/new - and please call out you're installing it via this AUR package. If it's a packaging problem, I'll point you back here. Thanks!

tomwadley commented on 2017-01-18 23:11

@lwin I believe this is an upstream issue and not related to the packaging although I'd be happy to be proven wrong. It's also slow for me. There are various issues on github complaining about slow loading. Let me know if you figure anything out.

lwin commented on 2017-01-18 22:50

The rule "source /usr/share/nvm/init-nvm.sh" at the end of my ~/.bashrc makes the load (start) of my terminal (urxvt) noteworthy slow. Is there a simple solution for this?

tomwadley commented on 2016-08-28 21:25

@Nowaker My intention was that you wouldn't use the convenience script init-nvm if you wanted customizations. But you're right, there's no reason for it to set NVM_DIR if it's already set. I've pushed a fix for this.

Nowaker commented on 2016-08-28 06:08

/usr/share/nvm/init-nvm.sh shouldn't override $NVM_DIR if one already exists.

tomwadley commented on 2016-06-25 12:09

Good call @gat. I've updated the postinstall message to say .zshrc instead of .zprofile.

gat commented on 2016-06-25 10:46

Question. Shouldn't the postinstall message

echo 'source /usr/share/nvm/init-nvm.sh' >> ~/.bashrc
echo 'source /usr/share/nvm/init-nvm.sh' >> ~/.zprofile

have .zshrc instead of .zprofile? The latter doesn't seem to work and for bash it's .bashrc instead of .profile for Bash.

tomwadley commented on 2016-05-19 21:58

@Lacrymology I'm having trouble reproducing your problem. "nvm ls-remote" and "nvm help" work for me. Does it work if you install nvm via the "official" upstream instructions at https://github.com/creationix/nvm ? In other words, is the package broken, or is something else wrong?

All comments