Repository: nvm
Issue: Installed using the script instructions on SailfishOS, but "env: can't execute `node`: No such file or directory"
Labels: needs followup

<!-- Thank you for being interested in nvm! Please help us by filling out the following form if you‘re having trouble. If you have a feature request, or some other question, please feel free to clear out the form. Thanks! -->

#### Operating system and version:
Sailfish OS 3.3.0.16

#### `nvm debug` output:
<details>
<!-- do not delete the following blank line -->

```sh
[nemo@Sailfish Templates]$ nvm debug
nvm --version: v0.35.3
$SHELL: /bin/bash
$SHLVL: 1
${HOME}: /home/nemo
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 3.2.57(1)-release (armv7l-unknown-linux-gnueabi)'
uname -a: 'Linux 4.4.153-perf #6 SMP PREEMPT Mon Mar 23 15:23:16 UTC 2020 aarch64 GNU/Linux'
OS version: Sailfish OS 3.3.0.16 (Rokua)
curl: /usr/bin/curl, curl 7.64.0-DEV (armv7l-unknown-linux-gnueabi) libcurl/7.64.0-DEV OpenSSL/1.0.2o zlib/1.2.11
wget: /usr/bin/wget, GNU Wget 1.20.1 built on linux-gnueabihf.
git: /usr/bin/git, git version 2.25.0
grep: /bin/grep, BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.
awk: /bin/awk, GNU Awk 3.1.5
sed: /bin/sed, GNU sed version 4.1.5
cut: /bin/cut, BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.
basename: /bin/basename, BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.
rm: /bin/rm, BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.
mkdir: /bin/mkdir, BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.
xargs: /usr/bin/xargs, BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.
nvm current: none
which node: 
which iojs: 
which npm: 
npm config get prefix: -bash: npm: command not found
npm root -g: -bash: npm: command not found

```
</details>

#### `nvm ls` output:
<details>
<!-- do not delete the following blank line -->

```sh
[nemo@Sailfish Templates]$ nvm ls
ls: invalid option -- 'q'
BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.

Usage: ls [-1AaCxdLHRFplinshrSXvctukZ] [-w WIDTH] [FILE]...

List directory contents

	-1	One column output
	-a	Include entries which start with .
	-A	Like -a, but exclude . and ..
	-x	List by lines
	-d	List directory entries instead of contents
	-L	Follow symlinks
	-H	Follow symlinks on command line
	-R	Recurse
	-p	Append / to dir entries
	-F	Append indicator (one of */=@|) to entries
	-l	Long listing format
	-i	List inode numbers
	-n	List numeric UIDs and GIDs instead of names
	-s	List allocated blocks
	-lc	List ctime
	-lu	List atime
	--full-time	List full date and time
	-h	Human readable sizes (1K 243M 2G)
	--group-directories-first
	-S	Sort by size
	-X	Sort by extension
	-v	Sort by version
	-t	Sort by mtime
	-tc	Sort by ctime
	-tu	Sort by atime
	-r	Reverse sort order
	-Z	List security context and permission
	-w N	Format N columns wide
	--color[={always,never,auto}]	Control coloring
ls: invalid option -- 'q'
BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.

Usage: ls [-1AaCxdLHRFplinshrSXvctukZ] [-w WIDTH] [FILE]...

List directory contents

	-1	One column output
	-a	Include entries which start with .
	-A	Like -a, but exclude . and ..
	-x	List by lines
	-d	List directory entries instead of contents
	-L	Follow symlinks
	-H	Follow symlinks on command line
	-R	Recurse
	-p	Append / to dir entries
	-F	Append indicator (one of */=@|) to entries
	-l	Long listing format
	-i	List inode numbers
	-n	List numeric UIDs and GIDs instead of names
	-s	List allocated blocks
	-lc	List ctime
	-lu	List atime
	--full-time	List full date and time
	-h	Human readable sizes (1K 243M 2G)
	--group-directories-first
	-S	Sort by size
	-X	Sort by extension
	-v	Sort by version
	-t	Sort by mtime
	-tc	Sort by ctime
	-tu	Sort by atime
	-r	Reverse sort order
	-Z	List security context and permission
	-w N	Format N columns wide
	--color[={always,never,auto}]	Control coloring
            N/A
ls: invalid option -- 'q'
BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.

Usage: ls [-1AaCxdLHRFplinshrSXvctukZ] [-w WIDTH] [FILE]...

List directory contents

	-1	One column output
	-a	Include entries which start with .
	-A	Like -a, but exclude . and ..
	-x	List by lines
	-d	List directory entries instead of contents
	-L	Follow symlinks
	-H	Follow symlinks on command line
	-R	Recurse
	-p	Append / to dir entries
	-F	Append indicator (one of */=@|) to entries
	-l	Long listing format
	-i	List inode numbers
	-n	List numeric UIDs and GIDs instead of names
	-s	List allocated blocks
	-lc	List ctime
	-lu	List atime
	--full-time	List full date and time
	-h	Human readable sizes (1K 243M 2G)
	--group-directories-first
	-S	Sort by size
	-X	Sort by extension
	-v	Sort by version
	-t	Sort by mtime
	-tc	Sort by ctime
	-tu	Sort by atime
	-r	Reverse sort order
	-Z	List security context and permission
	-w N	Format N columns wide
	--color[={always,never,auto}]	Control coloring
ls: invalid option -- 'q'
BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.

Usage: ls [-1AaCxdLHRFplinshrSXvctukZ] [-w WIDTH] [FILE]...

List directory contents

	-1	One column output
	-a	Include entries which start with .
	-A	Like -a, but exclude . and ..
	-x	List by lines
	-d	List directory entries instead of contents
	-L	Follow symlinks
	-H	Follow symlinks on command line
	-R	Recurse
	-p	Append / to dir entries
	-F	Append indicator (one of */=@|) to entries
	-l	Long listing format
	-i	List inode numbers
	-n	List numeric UIDs and GIDs instead of names
	-s	List allocated blocks
	-lc	List ctime
	-lu	List atime
	--full-time	List full date and time
	-h	Human readable sizes (1K 243M 2G)
	--group-directories-first
	-S	Sort by size
	-X	Sort by extension
	-v	Sort by version
	-t	Sort by mtime
	-tc	Sort by ctime
	-tu	Sort by atime
	-r	Reverse sort order
	-Z	List security context and permission
	-w N	Format N columns wide
	--color[={always,never,auto}]	Control coloring
ls: invalid option -- 'q'
BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.

Usage: ls [-1AaCxdLHRFplinshrSXvctukZ] [-w WIDTH] [FILE]...

List directory contents

	-1	One column output
	-a	Include entries which start with .
	-A	Like -a, but exclude . and ..
	-x	List by lines
	-d	List directory entries instead of contents
	-L	Follow symlinks
	-H	Follow symlinks on command line
	-R	Recurse
	-p	Append / to dir entries
	-F	Append indicator (one of */=@|) to entries
	-l	Long listing format
	-i	List inode numbers
	-n	List numeric UIDs and GIDs instead of names
	-s	List allocated blocks
	-lc	List ctime
	-lu	List atime
	--full-time	List full date and time
	-h	Human readable sizes (1K 243M 2G)
	--group-directories-first
	-S	Sort by size
	-X	Sort by extension
	-v	Sort by version
	-t	Sort by mtime
	-tc	Sort by ctime
	-tu	Sort by atime
	-r	Reverse sort order
	-Z	List security context and permission
	-w N	Format N columns wide
	--color[={always,never,auto}]	Control coloring
ls: invalid option -- 'q'
BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.

Usage: ls [-1AaCxdLHRFplinshrSXvctukZ] [-w WIDTH] [FILE]...

List directory contents

	-1	One column output
	-a	Include entries which start with .
	-A	Like -a, but exclude . and ..
	-x	List by lines
	-d	List directory entries instead of contents
	-L	Follow symlinks
	-H	Follow symlinks on command line
	-R	Recurse
	-p	Append / to dir entries
	-F	Append indicator (one of */=@|) to entries
	-l	Long listing format
	-i	List inode numbers
	-n	List numeric UIDs and GIDs instead of names
	-s	List allocated blocks
	-lc	List ctime
	-lu	List atime
	--full-time	List full date and time
	-h	Human readable sizes (1K 243M 2G)
	--group-directories-first
	-S	Sort by size
	-X	Sort by extension
	-v	Sort by version
	-t	Sort by mtime
	-tc	Sort by ctime
	-tu	Sort by atime
	-r	Reverse sort order
	-Z	List security context and permission
	-w N	Format N columns wide
	--color[={always,never,auto}]	Control coloring
ls: invalid option -- 'q'
BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.

Usage: ls [-1AaCxdLHRFplinshrSXvctukZ] [-w WIDTH] [FILE]...

List directory contents

	-1	One column output
	-a	Include entries which start with .
	-A	Like -a, but exclude . and ..
	-x	List by lines
	-d	List directory entries instead of contents
	-L	Follow symlinks
	-H	Follow symlinks on command line
	-R	Recurse
	-p	Append / to dir entries
	-F	Append indicator (one of */=@|) to entries
	-l	Long listing format
	-i	List inode numbers
	-n	List numeric UIDs and GIDs instead of names
	-s	List allocated blocks
	-lc	List ctime
	-lu	List atime
	--full-time	List full date and time
	-h	Human readable sizes (1K 243M 2G)
	--group-directories-first
	-S	Sort by size
	-X	Sort by extension
	-v	Sort by version
	-t	Sort by mtime
	-tc	Sort by ctime
	-tu	Sort by atime
	-r	Reverse sort order
	-Z	List security context and permission
	-w N	Format N columns wide
	--color[={always,never,auto}]	Control coloring
ls: invalid option -- 'q'
BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.

Usage: ls [-1AaCxdLHRFplinshrSXvctukZ] [-w WIDTH] [FILE]...

List directory contents

	-1	One column output
	-a	Include entries which start with .
	-A	Like -a, but exclude . and ..
	-x	List by lines
	-d	List directory entries instead of contents
	-L	Follow symlinks
	-H	Follow symlinks on command line
	-R	Recurse
	-p	Append / to dir entries
	-F	Append indicator (one of */=@|) to entries
	-l	Long listing format
	-i	List inode numbers
	-n	List numeric UIDs and GIDs instead of names
	-s	List allocated blocks
	-lc	List ctime
	-lu	List atime
	--full-time	List full date and time
	-h	Human readable sizes (1K 243M 2G)
	--group-directories-first
	-S	Sort by size
	-X	Sort by extension
	-v	Sort by version
	-t	Sort by mtime
	-tc	Sort by ctime
	-tu	Sort by atime
	-r	Reverse sort order
	-Z	List security context and permission
	-w N	Format N columns wide
	--color[={always,never,auto}]	Control coloring
iojs -> N/A (default)
node -> stable (-> N/A) (default)
unstable -> N/A (default)
lts/* -> lts/erbium (-> v12.17.0)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.20.1 (-> N/A)
lts/erbium -> v12.17.0
[nemo@Sailfish Templates]$ 
```
</details>

#### How did you install `nvm`?
<!-- (e.g. install script in readme, Homebrew) -->
I used the `wget` bash script one liner.

#### What steps did you perform?
Prior to installing nvm using the script, I uninstalled node from my system repo (since I believe nvm is supposed to install it itself in user space) and deleted potential remnants from a prior installation:

```sh
sudo zypper remove node
rm -rf ~/.nvm
rm -rf ~/.npm
rm -rf ~/node_modules
```
 I also made sure nothing related to node or nvm was in my `~/.bashrc` and `~/.bash_profile`. Then I installed nvm using the script instructions in the readme ans sourced `~/.bashrc`.

#### What happened?
I then ran `nvm install --lts`, which downloaded it but I get this at the end:
```sh
v12.17.0 is already installed.
env: can't execute 'node': No such file or directory
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v12.17.0` to unset it.
```
Running `nvm use --delete-prefix v12.17.0` as instructed did not help.

#### What did you expect to happen?
I tried also other node versions, but every time I will get this `env: can't execute node: No such file or directory`

#### Is there anything in any of your profile files that modifies the `PATH`?
<!--  (e.g. `.bashrc`, `.bash_profile`, `.zshrc`, etc) -->
No:

```sh
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions
alias cmus='export TERM=xterm-color && cmus'
alias cava='export TERM=xterm-color && cava'

# Set default terminal editor
export EDITOR='micro'
export VISUAL='micro'

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
```

```sh
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
```

Note that we have an old version of `node` available for installation through our package repository, and I used to use it successfully, however it's very old and therefore incompatible with many things now. Plus, as far as I understand, installing node from repository is discouraged because it will require root privileges to use npm afterwards, right?