Package Details: nvm 0.37.2-1

Git Clone URL: (read-only, click to copy)
Package Base: nvm
Description: Node Version Manager - Simple bash script to manage multiple active node.js versions
Upstream URL:
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/

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

echo 'source /usr/share/nvm/' >> ~/.bashrc

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

Latest Comments

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

hutliver commented on 2018-11-04 06:11

@tomwadley same error :/

tomwadley commented on 2018-11-01 18:34

@hutliver I'm not sure what's happening here. Can you try removing this package and installing nvm the "official" upstream way with their curl|bash?

hutliver commented on 2018-11-01 15:17

Hi! Facing this error with the package, there's no relevant info.. bash: /usr/share/nvm/ line 62: syntax error near unexpected token }' bash: /usr/share/nvm/ line 62:}' bash: /usr/share/nvm/bash_completion: line 48: syntax error near unexpected token }' bash: /usr/share/nvm/bash_completion: line 48:}'

using termite

tomwadley commented on 2018-08-25 19:19

@ferrantejake The post-install instructions explain that you have to source nvm into your shell before you can use it. This is unlike typical applications which install an executable into /usr/bin which you can just call out-of-the-box. This is the way nvm is designed and its a difficult problem to work around without making sacrifices that I don't think are appropriate to force on all users of the package. For example, I believe it would be possible for this package to install something in /etc to auto source nvm for all users, but that seems quite invasive to me. With some modifications to the way nvm works though, some sort of "system nvm" which doesn't require sourcing does seem possible, and it would be interesting to explore that one day, probably as a separate package.

For now, this package includes a handy script "/usr/share/nvm/" which you can source in your .bashrc to get nvm working.

ferrantejake commented on 2018-08-25 17:02

Seems to not be working out-of-the-box. I ran the following (from the nvm git repo) to get the package working in the command line:

export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/" ] && . "$NVM_DIR/" # This loads nvm

Would it be possible to get this added to the PKGBUILD script?

effeeffe commented on 2018-08-14 15:18

Now that package nodejs-fake does not exist anymore, what is the suggested way to go about this?

EDIT: the wiki has been updated.

Twiki commented on 2018-08-11 18:11

@tomwadley You are right. Thanks! In the readme at Github, sourcing nvm is mentioned after the second "command -v nvm". I stopped after the first.

tomwadley commented on 2018-08-11 18:07

@Twiki you need to "source" nvm into your environment before you can run it. Look at the post-install instructions here that you may have missed

Twiki commented on 2018-08-11 17:43

Just installed, next to main Arch repo's already installed v10.8.0.

Result: nvm not found. command verify produces no output. nvm does exist.

[twiki@21stcentury 4.4.23 ~]# nvm run node --version

bash: nvm: command not found

[twiki@21stcentury 4.4.23 ~]# command -v nvm

[twiki@21stcentury 4.4.23 ~]# whereis nvm

nvm: /usr/share/nvm

[twiki@21stcentury 4.4.23 ~]#

-._. What went wrong?

FranklinYu commented on 2018-07-17 19:53

Note that for may not work for every Zsh user, such as one who wants separate path for .zcompdump files, because option is hardcoded in bash_completion. I fell back to zsh-completions.