Package Details: nvm 0.39.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: 213
Popularity: 7.87
First Submitted: 2015-03-14 21:57 (UTC)
Last Updated: 2021-12-18 04:42 (UTC)

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

andradei commented on 2022-01-14 00:31 (UTC) (edited on 2022-01-14 00:56 (UTC) by andradei)

Solution to issue below:

The package is fine. My config was the problem.

I'm using zsh as my shell and had the line source /usr/share/nvm/init-nvm.sh in my .zshenv. Moving it to .zshrc fixed it.

Looks like my distro sources .zshenv on every keybinding I press. I don't know...


Issue

Beginner in arch here. I installed the EndeavorOS bspwm (community) edition and it works perfectly until I install this package.

This is how I installed it:

yay -S --noconfirm nvm
source /usr/share/nvm/init-nvm.sh
nvm install node

and all of a sudden all of my keybindings take 1-2 seconds to register, as opposed to instantly.

I went so far as to reinstall the distro and install each package I use and reboot the system (I know it's overkill) until I found what was slowing it down.

After finding out, removing this package with yay -Rusn nvm "fixed" the problem.

tomwadley commented on 2021-09-27 14:19 (UTC)

@meijin this package doesn't create those files. nvm is for installing a local (per-user) version of node. The local version you install won't conflict with the system version.

meijin commented on 2021-09-27 07:57 (UTC) (edited on 2021-09-27 07:57 (UTC) by meijin)

maybe it should be conflict with node/npm packages? or provide them? because otherwise when something is trying to install node/npm as dep:

error: failed to commit transaction (conflicting files)
npm: /usr/lib/node_modules/npm/docs/content/commands/npm-access.md exists in filesystem
npm: /usr/lib/node_modules/npm/docs/content/commands/npm-adduser.md exists in filesystem
npm: /usr/lib/node_modules/npm/docs/content/commands/npm-audit.md exists in filesystem
npm: /usr/lib/node_modules/npm/docs/content/commands/npm-bin.md exists in filesystem
npm: /usr/lib/node_modules/npm/docs/content/commands/npm-bugs.md exists in filesystem
npm: /usr/lib/node_modules/npm/docs/content/commands/npm-cache.md exists in filesystem
npm: /usr/lib/node_modules/npm/docs/content/commands/npm-ci.md exists in filesystem
npm: /usr/lib/node_modules/npm/docs/content/commands/npm-completion.md exists in filesystem
npm: /usr/lib/node_modules/npm/docs/content/commands/npm-config.md exists in filesystem
npm: /usr/lib/node_modules/npm/docs/content/commands/npm-dedupe.md exists in filesystem
npm: /usr/lib/node_modules/npm/docs/content/commands/npm-deprecate.md exists in filesystem
npm: /usr/lib/node_modules/npm/docs/content/commands/npm-dist-tag.md exists in filesystem
...

tomwadley commented on 2021-05-24 18:35 (UTC)

No problem @alexnortung, all good :)

alexnortung commented on 2021-05-24 17:47 (UTC)

@tomwadley Yes my bad, I feel pretty dump for commenting on the wrong package.

tomwadley commented on 2021-05-22 19:10 (UTC)

@alexnortung this package does not install node. This package is for nvm, which is a shell script you can use to install node. Did you mean to comment on the session-desktop package?

alexnortung commented on 2021-05-22 18:55 (UTC)

Installing does not work at the moment. I get an error:

error session-desktop@1.6.3: The engine "node" is incompatible with this module. Expected version "^10.19.0". Got "10.13.0"
error Found incompatible module.

It seems like the PKGBUILD is installing the 10.13.0 version of node. But for some reason it expects 10.19.0.

protolomeo commented on 2021-04-20 18:44 (UTC)

@tomwadley I can confirm that's working now. Thanks for the help!

garionion commented on 2021-04-19 09:42 (UTC)

@tomwadley thank you :) i can confirm, that it does work now

tomwadley commented on 2021-04-18 23:18 (UTC)

Thanks for the report @protolomeo and sorry for the delay @garlonion. I reproduced the issue in a chroot. It looks like there were some files in the zip which had characters in the filenames that were causing issues with bsdtar depending on your locale.

I switched to the tarball which I think has fixed the issue. Please let me know. Not sure why I wasn't using the tarball in the first place. I guess there was only a zip available when I created the package.

protolomeo commented on 2021-04-18 22:07 (UTC)

@garlonion I have the same exact issue.

locale -a
C
POSIX
it_IT
it_IT.iso88591
it_IT.utf8
italian

garionion commented on 2021-04-12 08:42 (UTC)

@tomwadley i already tried using no aur helper before i commentet here. And the output from using bsdtar directly is the same:

❯ bsdtar -xf v0.38.0.zip
bsdtar: Pathname cannot be converted from UTF-8 to current locale.
bsdtar: Archive entry has empty or unreadable filename ... skipping.
bsdtar: Pathname cannot be converted from UTF-8 to current locale.
bsdtar: Archive entry has empty or unreadable filename ... skipping.
bsdtar: Error exit delayed from previous errors.

tomwadley commented on 2021-04-11 22:42 (UTC)

@garionion can you try downloading the zip file manually and extracting it with bsdtar? i.e.

$ wget https://github.com/nvm-sh/nvm/archive/refs/tags/v0.38.0.zip
$ bsdtar -xf v0.38.0.zip

If that works, the next thing I'd try is to build this package without using any AUR helper (download snapshot, run makepkg).

garionion commented on 2021-04-11 19:33 (UTC) (edited on 2021-04-11 19:33 (UTC) by garionion)

hi, with 0.38.0-1 i get "Failed to extract nvm-0.38.0.zip":

==> Extracting sources...
  -> Extracting nvm-0.38.0.zip with bsdtar
bsdtar: Pathname cannot be converted from UTF-8 to current locale.
bsdtar: Archive entry has empty or unreadable filename ... skipping.
bsdtar: Pathname cannot be converted from UTF-8 to current locale.
bsdtar: Archive entry has empty or unreadable filename ... skipping.
bsdtar: Error exit delayed from previous errors.
==> ERROR: Failed to extract nvm-0.38.0.zip
    Aborting...

My locale is:

❯ locale -a
C
C.utf8
POSIX
de_DE
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
de_DE@euro
deutsch
en_US.utf8
german

Do you have any ideas?

tomwadley commented on 2021-03-30 21:26 (UTC)

@CliffJumper I can't reproduce that. I downloaded it manually and double checked - seems fine to me. Is it still happening?

CliffJumper commented on 2021-03-30 20:23 (UTC)

For nvm 0.38.0 I'm getting a mismatch in the sha256 sum for the zip file

foxite commented on 2021-02-18 19:18 (UTC)

@joshsteele21 I found out that the cause was that I used a GUI tool to change the LC_TIME, but the locale I changed it to wasn't installed. I guess that's a bug in KDE.

Changing it to a locale that was actually supported has solved the issue.

jost21 commented on 2021-02-18 19:16 (UTC) (edited on 2021-02-18 19:27 (UTC) by jost21)

@foxite I have a similar issue, it happens every once in a while after an update. Apparently the issue has to do with glibc, at least in my case. There are files missing in /usr/share/i18n/locales

see https://unix.stackexchange.com/questions/604134/how-to-fix-missing-locale-files-on-manjaro/

tomwadley commented on 2021-02-12 00:24 (UTC)

@foxite presumably there is something wrong with your locale config. Take a look at the Locale wiki page.

foxite commented on 2021-02-11 12:02 (UTC) (edited on 2021-02-13 15:49 (UTC) by foxite)

Edit: For some reason I had assumed that sourcing init-nvm.sh was causing the error, but it's more likely that init-nvm.sh is encountering an error.

Adding this line to .bashrc as instructed:

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

Causes the following message to appear when I open a terminal:

manpath: can't set the locale; make sure $LC_* and $LANG are correct

Removing the line causes the message to go away, though obviously I can't use nvm without it. I suspect that this is related to the inexplicable locale errors I have been getting in various other command line tools. Upon inspection, there seems to be nothing wrong with $LANG or my $LC_* variables; they are the same with or without init-nvm.

Any ideas what is causing this problem or how to fix it? It is pretty annoying, but seems harmless.

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.

Nowaker commented on 2020-09-04 18:38 (UTC)

How do I use nvm these days? In the past, this package exposed nvm command I could freely use.

tomwadley commented on 2020-02-09 22:20 (UTC)

@FranklinYu The reason I kept them separate is because install-nvm-exec feel a little more "controversial" to me. I can imagine some people explicitly not wanting install-nvm-exec to run as it modifies your home directory... (not much mind you - it just creates ~/.nvm and puts some symlinks there)

But you're right that if users want to avoid install-nvm-exec they would also be avoiding init-nvm.sh as well.... so maybe keeping them separate is silly.

But the need to do that really highlights the way in which nvm was not designed to be packaged via a system package manager like pacman. The "official" way to install it is via their install.sh script which makes way more drastic changes to your home directory! (edits ~/.bashrc etc.)

FranklinYu commented on 2020-02-06 07:29 (UTC)

Do you think it makes sense to merge install-nvm-exec into init-nvm.sh? Both scripts are very short.

tomwadley commented on 2019-09-22 15:04 (UTC)

Thanks for the heads-up @donsmith - I've updated the url.

donsmith commented on 2019-09-22 04:38 (UTC)

@tomwadley, just a heads-up for your next update. The nvm repo has moved to https://github.com/nvm-sh/nvm. Obviously this has not broken this package - just letting you know.

I was confused about it until I went back in the commits and verified that the same repo used to belong to Tim (creationx) and has been removed from its old location.

tomwadley commented on 2019-03-25 13:37 (UTC)

Thanks for the tip @jamespharvey20. I wasn't aware of SRCDEST. Fixed.

jamespharvey20 commented on 2019-03-25 09:06 (UTC)

Downloaded source filenames must be unique, for those who set SRCDEST in /etc/makepkg.conf. See https://wiki.archlinux.org/index.php/PKGBUILD#source

Please add something like this to the beginning of source:

source=("${pkgname}-${pkgver}.zip::https...

tomwadley commented on 2019-03-17 17:53 (UTC)

@joshsteele21 You shouldn't have to change any permissions or use sudo. And you're sourcing (as opposed to executing) init-nvm.sh right? Have you previously tried to install nvm the "official" way from their readme? There could be some sort of conflict going on there.

jost21 commented on 2019-03-08 02:26 (UTC) (edited on 2019-03-08 17:50 (UTC) by jost21)

Installation and running the init-nvm.sh script works fine, but running nvm install node does not work because of permission denied errors. Using sudo does not recognize the nvm command (sudo: nvm: command not found)

EDIT: Do I need to manually change the permissions on /usr/share/nvm ?

FranklinYu commented on 2019-02-10 16:55 (UTC) (edited on 2019-02-10 22:18 (UTC) by FranklinYu)

@bobpaul Actually NVM is not designed to be used in script, IIUC. Please notify those project owners that nvm-exec is the correct tool for non-interactive use. Or is there any example for us to have a look?

EDIT: please forgive my innocence and ignore the comment above. Official suggestion is to use nvm exec which expects nvm.sh to be in $NVM_DIR.

tomwadley commented on 2019-02-07 22:50 (UTC) (edited on 2019-02-09 19:28 (UTC) by tomwadley)

@bobpaul thanks for the suggestion. I've made this change over on nvm-git [0]. Can you take a look and see if that works for you? If I don't hear any complaints, I'll push the same change to this package in a day or two.

[0] https://aur.archlinux.org/packages/nvm-git/

EDIT: I've pushed the change here too.

bobpaul commented on 2019-02-06 19:24 (UTC)

@tomwardley I've encountered projects that use nvm inside their own bash script. Since bash scripts don't inherit bash functions from the parent shell, these projects all expect to see nvm.sh inside $NVM_DIR. This is solved with ln -s /usr/share/nvm/nvm.sh $NVM_DIR/. Can you add that to the same script that copies nvm-exec?

FranklinYu commented on 2018-12-29 02:02 (UTC)

@Codex0 After installing, you should see your package manager prompting you to do so. If not, you should get a better package manager.

About why you need to do so, package maintainer has explained it on August 25th, 2018. Please find the corresponding comment.

Codex0 commented on 2018-12-28 14:50 (UTC)

Found that despite installing this I still had to manually execute:

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

tomwadley commented on 2018-11-04 21:50 (UTC)

@hutliver Sorry to hear it. In that case, it's not a package issue. I'd suggest seeking help from upstream. Read their readme to make sure you haven't missed something. Otherwise, they're pretty responsive to Github issues.

hutliver commented on 2018-11-04 06:11 (UTC)

@tomwadley same error :/

tomwadley commented on 2018-11-01 18:34 (UTC)

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

hutliver commented on 2018-11-01 15:17 (UTC)

Hi! Facing this error with the package, there's no relevant info.. bash: /usr/share/nvm/nvm.sh: line 62: syntax error near unexpected token }' bash: /usr/share/nvm/nvm.sh: 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 (UTC)

@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/init-nvm.sh" which you can source in your .bashrc to get nvm working.

ferrantejake commented on 2018-08-25 17:02 (UTC)

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.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm

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

effeeffe commented on 2018-08-14 15:18 (UTC) (edited on 2018-11-05 10:26 (UTC) by effeeffe)

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 (UTC) (edited on 2018-08-11 18:11 (UTC) by Twiki)

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

@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 https://aur.archlinux.org/cgit/aur.git/tree/nvm.install?h=nvm

Twiki commented on 2018-08-11 17:43 (UTC) (edited on 2018-08-11 17:47 (UTC) by Twiki)

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 (UTC) (edited on 2018-07-17 20:02 (UTC) by FranklinYu)

Note that for init-nvm.sh 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.

ljharb commented on 2018-06-29 01:32 (UTC)

Hi Fandekasp - do you have a "prefix" line in your ~/.npmrc, perhaps? If so, remove it.

If that doesn't work or apply, please file a new issue on the nvm github repo. Thanks!

Fandekasp commented on 2018-06-29 01:15 (UTC) (edited on 2018-06-29 01:16 (UTC) by Fandekasp)

Recently, I'm getting the following message everytime I open a shell

nvm is not compatible with the npm config "prefix" option: currently set to "" Run npm config delete prefix or nvm use --delete-prefix v10.5.0 --silent to unset it.

Uninstalling and re-installing nvm didn't fix the issue. Running the 2 commands suggested doesn't change anything either

tomwadley commented on 2018-01-29 13:57 (UTC)

@Depado This package doesn't create that file. I think that file is created by the official install.sh if you tell it to enable nvm for all users on the machine (an idea that might be worth looking into for this package actually). I guess you should follow the official uninstall instructions if you've used the official install.sh script.

Depado commented on 2018-01-29 10:00 (UTC)

Just a heads up, when uninstalling the package, /etc/profile.d/nvm.sh isn't deleted. This caused my X session to fail on startup. (I have no idea if that's just me or if that happened to someone else)

darkbasic commented on 2018-01-23 09:59 (UTC)

@givemeurhats The nodejs-fake you were talking about does not exist...

givemeurhats commented on 2018-01-19 01:36 (UTC)

Check out https://aur.archlinux.org/packages/nodejs-fake/ which takes care so packages like npm don't install nodejs as their dependency, keeping nvm the only source of nodejs on the system.

ljharb commented on 2017-06-01 22:05 (UTC)

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

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

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

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

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

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

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

tomwadley commented on 2016-06-25 12:09 (UTC)

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

gat commented on 2016-06-25 10:46 (UTC)

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 (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?