Package Details: nvm 0.37.2-1

Git Clone URL: https://aur.archlinux.org/nvm.git (read-only, click to copy)
Package Base: nvm
Description: Node Version Manager - Simple bash script to manage multiple active node.js versions
Upstream URL: https://github.com/nvm-sh/nvm
Licenses: MIT
Submitter: tomwadley
Maintainer: tomwadley
Last Packager: tomwadley
Votes: 163
Popularity: 2.78
First Submitted: 2015-03-14 21:57
Last Updated: 2020-11-28 17:09

Dependencies (1)

Required by (24)

Sources (3)

Pinned Comments

tomwadley commented on 2020-09-04 22:14

Due to the way nvm is designed, you have to source it before you can use it:

source /usr/share/nvm/init-nvm.sh

You will probably want that in your shell startup file, e.g.:

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

See nvm.install or the upstream README for more details.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

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?

Lacrymology commented on 2016-05-19 20:02

ls-remote doesn't seem to exist, and nvm-help isn't there either.

22:01 $ nvm ls-remote
module.js:440
throw err;
^

Error: Cannot find module './nvm-help'
at Function.Module._resolveFilename (module.js:438:15)
at Function.Module._load (module.js:386:25)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/nvm/bin/nvm:24:3)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)

isaacaggrey commented on 2016-03-11 19:55

Thanks for the quick response @tomwadley! Works great on my end.

tomwadley commented on 2016-03-11 19:47

Thanks @isaacaggrey - well spotted. I've pushed a new package version which should fix this. It should just work if you're sourcing init-nvm.sh. Otherwise you can add this new line to your .bashrc:

source /usr/share/nvm/install-nvm-exec

install-nvm-exec is a script which installs a wrapper around nvm-exec into your $NVM_DIR. Its a bit of hack but it should work. At the moment I can't think of a better way without patching upstream's nvm.sh.

isaacaggrey commented on 2016-03-11 17:53

`nvm exec` does not work. Is this working for other people?

The PKGBUILD doesn't install `nvm-exec` from the repo, but then the issue is
that nvm expects it in a certain place (more or less, assumes everything is
in $HOME/.nvm).