Package Details: nvm 0.40.1-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: 298
Popularity: 5.85
First Submitted: 2015-03-14 21:57 (UTC)
Last Updated: 2024-08-27 22:35 (UTC)

Dependencies (1)

Required by (490)

Sources (3)

Pinned Comments

tomwadley commented on 2020-09-04 22:14 (UTC) (edited on 2020-09-04 22:15 (UTC) by tomwadley)

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 .. 3 4 5 6 7 8

tomwadley commented on 2016-05-19 21:58 (UTC)

@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 (UTC)

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 (UTC)

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

tomwadley commented on 2016-03-11 19:47 (UTC)

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 (UTC) (edited on 2016-03-11 17:56 (UTC) by isaacaggrey)

`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).

tomwadley commented on 2016-02-19 14:34 (UTC)

@Rulatir The post_install prints out some instructions which you may have missed. I'll paste them below: You need to source nvm before you can use it. Do one of the following or similar depending on your shell (and then restart your shell): echo 'source /usr/share/nvm/init-nvm.sh' >> ~/.bashrc echo 'source /usr/share/nvm/init-nvm.sh' >> ~/.zprofile You can now install node.js versions (e.g. nvm install 5.0) and activate them (e.g. nvm use 5.0). You may want to activate your preferred node.js version in your .bashrc (or similar) after sourcing init-nvm.sh. init-nvm.sh is a convenience script which does the following: export NVM_DIR="$HOME/.nvm" source /usr/share/nvm/nvm.sh source /usr/share/nvm/bash_completion You may wish to customize and put these lines directly in your .bashrc (or similar) if, for example, you would like an NVM_DIR other than ~/.nvm or you don't want bash completion. See the nvm readme for more information: https://github.com/creationix/nvm

Rulatir commented on 2016-02-19 14:28 (UTC)

No executable in the package? Instructions at nvm's github say the usage should be simply: nvm [arguments] However this package does not contain /usr/bin/nvm. How do I use this?