NGINX Proxy Manager Script, nvm: command not found #2072

Closed
opened 2025-11-20 05:22:52 -05:00 by saavagebueno · 2 comments
Owner

Originally created by @timlindeberg on GitHub (Oct 12, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

NGINX Proxy manager

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/nginxproxymanager.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 13

📈 Which Proxmox version are you on?

pve-manager/9.0.3/025864202ebb6109 (running kernel: 6.14.8-2-pve)

📝 Provide a clear and concise description of the issue.

Running the script I get an error after installing NVM:

bash: line 51: nvm: command not found

If I go into the LXC afterwards the following has been appended to .profile:

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

But I still get bash: nvm: command not found.

Does it have to run something like source ~/.nvm/nvm.sh before using the nvm command?

🔄 Steps to reproduce the issue.

Run the script from the proxmox shell.

Paste the full error output (if available).

Installing Node.js=> Downloading nvm from git to '/root/.nvm'
=> Cloning into '/root/.nvm'...
remote: Enumerating objects: 383, done.
remote: Counting objects: 100% (383/383), done.
remote: Compressing objects: 100% (326/326), done.
remote: Total 383 (delta 43), reused 179 (delta 29), pack-reused 0 (from 0)
Receiving objects: 100% (383/383), 391.78 KiB | 7.25 MiB/s, done.
Resolving deltas: 100% (43/43), done.

  • (HEAD detached at FETCH_HEAD)
    master
    => Compressing and cleaning up git repository

=> Appending nvm source string to /root/.profile
=> bash_completion source string already in /root/.profile
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
bash: line 51: nvm: command not found

[ERROR] in line 51: exit code 0: while executing command $STD nvm install 16.20.2
The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.

[ERROR] in line 1345: exit code 0: while executing command lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/${var_install}.sh)

🖼️ Additional context (optional).

No response

Originally created by @timlindeberg on GitHub (Oct 12, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? NGINX Proxy manager ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/nginxproxymanager.sh)" ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 13 ### 📈 Which Proxmox version are you on? pve-manager/9.0.3/025864202ebb6109 (running kernel: 6.14.8-2-pve) ### 📝 Provide a clear and concise description of the issue. Running the script I get an error after installing NVM: bash: line 51: nvm: command not found If I go into the LXC afterwards the following has been appended to `.profile`: ``` export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm ``` But I still get bash: nvm: command not found. Does it have to run something like `source ~/.nvm/nvm.sh` before using the nvm command? ### 🔄 Steps to reproduce the issue. Run the script from the proxmox shell. ### ❌ Paste the full error output (if available). ⏳ Installing Node.js=> Downloading nvm from git to '/root/.nvm' => Cloning into '/root/.nvm'... remote: Enumerating objects: 383, done. remote: Counting objects: 100% (383/383), done. remote: Compressing objects: 100% (326/326), done. remote: Total 383 (delta 43), reused 179 (delta 29), pack-reused 0 (from 0) Receiving objects: 100% (383/383), 391.78 KiB | 7.25 MiB/s, done. Resolving deltas: 100% (43/43), done. * (HEAD detached at FETCH_HEAD) master => Compressing and cleaning up git repository => Appending nvm source string to /root/.profile => bash_completion source string already in /root/.profile => Close and reopen your terminal to start using nvm or run the following to use it now: export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm bash: line 51: nvm: command not found [ERROR] in line 51: exit code 0: while executing command $STD nvm install 16.20.2 The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output. [ERROR] in line 1345: exit code 0: while executing command lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/${var_install}.sh) ### 🖼️ Additional context (optional). _No response_
saavagebueno added the bugexternal labels 2025-11-20 05:22:52 -05:00
Author
Owner

@MickLesk commented on GitHub (Oct 12, 2025):

Nvm will be installed per external call, nothing we can do Here.

$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh)
source ~/.bashrc
$STD nvm install 16.20.2
ln -sf /root/.nvm/versions/node/v16.20.2/bin/node /usr/bin/node

Install Work fine at my Node. Maybe the Script will be blocked by something in your Network? E.g. AdBlocker, DNS, or something?

If it not work -> Report this to nvm Repo

@MickLesk commented on GitHub (Oct 12, 2025): Nvm will be installed per external call, nothing we can do Here. $STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh) source ~/.bashrc $STD nvm install 16.20.2 ln -sf /root/.nvm/versions/node/v16.20.2/bin/node /usr/bin/node Install Work fine at my Node. Maybe the Script will be blocked by something in your Network? E.g. AdBlocker, DNS, or something? If it not work -> Report this to nvm Repo
Author
Owner

@timlindeberg commented on GitHub (Oct 14, 2025):

Hello! Thanks for responding! The issue is not that nvm isn't installed, it's that the nvm command isn't available in the shell. If I enter the LXC I can see that nvm is installed and if I run source ~/.nvm/nvm.sh then I can use the nvm command.

EDIT: Looks like this is where nvm is installed:

d4dd02c115/install/nginxproxymanager-install.sh (L48)

It will call source ~/.bashrc but at least on my machine the nvm installer puts the nvm initialisation into ~/.profile so sourcing ~/.bashrc doesn't seem to make nvm available.

EDIT2: Figured it out. It's because I'm using zsh in proxmox. Even though I run the install script in bash, because my $SHELL env variable is set to zsh (and this is propagated to the LXC container), the nvm install script gets confused and doesn't put the nvm initialisation logic into .bashrc but instead puts it into .profile. Changing my default shell back to bash and running the script fixes the issue. I think the NVM install logic above could be a bit more robust by using sourcing ~/.nvm/nvm.sh instead of ~/.bashrc but I guess many install scripts might assume that the shell is set to bash anyways.

@timlindeberg commented on GitHub (Oct 14, 2025): Hello! Thanks for responding! The issue is not that nvm isn't installed, it's that the nvm command isn't available in the shell. If I enter the LXC I can see that nvm is installed and if I run `source ~/.nvm/nvm.sh` then I can use the nvm command. EDIT: Looks like this is where nvm is installed: https://github.com/community-scripts/ProxmoxVE/blob/d4dd02c1154b21df753d49c6ae49e6440da0ff52/install/nginxproxymanager-install.sh#L48 It will call `source ~/.bashrc` but at least on my machine the nvm installer puts the nvm initialisation into `~/.profile` so sourcing `~/.bashrc` doesn't seem to make nvm available. EDIT2: Figured it out. It's because I'm using zsh in proxmox. Even though I run the install script in bash, because my $SHELL env variable is set to zsh (and this is propagated to the LXC container), the nvm install script gets confused and doesn't put the nvm initialisation logic into `.bashrc` but instead puts it into `.profile`. Changing my default shell back to bash and running the script fixes the issue. I think the NVM install logic above could be a bit more robust by using sourcing `~/.nvm/nvm.sh` instead of `~/.bashrc` but I guess many install scripts might assume that the shell is set to bash anyways.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#2072