Proxmox: NGINX Proxy Manager // bash: line 58: nvm: command not found
A clear and concise description of the issue.
When trying to use the nginx proxy manager script on Proxmox 8.0.3, I am getting this error related to nodejs failing to install:
+ msg_info 'Installing Node.js'
+ local 'msg=Installing Node.js'
+ echo -ne ' - \033[33mInstalling Node.js...'
- Installing Node.js...+ bash /dev/fd/63
++ curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh
=> Downloading nvm from git to '/root/.nvm'
=> Cloning into '/root/.nvm'...
remote: Enumerating objects: 360, done.
remote: Counting objects: 100% (360/360), done.
remote: Compressing objects: 100% (306/306), done.
remote: Total 360 (delta 40), reused 169 (delta 28), pack-reused 0
Receiving objects: 100% (360/360), 220.28 KiB | 2.62 MiB/s, done.
Resolving deltas: 100% (40/40), 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
+ . /root/.bashrc
+ nvm install 16.20.1
bash: line 58: nvm: command not found
++ error_handler 58 '$STD nvm install 16.20.1'
++ local exit_code=127
++ local line_number=58
++ local 'command=$STD nvm install 16.20.1'
++ local 'error_message=\033[01;31m[ERROR]\033[m in line \033[01;31m58\033[m: exit code \033[01;31m127\033[m: while executing command \033[33m$STD nvm install 16.20.1\033[m'
++ echo -e '\n\033[01;31m[ERROR]\033[m in line \033[01;31m58\033[m: exit code \033[01;31m127\033[m: while executing command \033[33m$STD nvm install 16.20.1\033[m'
[ERROR] in line 58: exit code 127: while executing command $STD nvm install 16.20.1
++ [[ 58 -eq 24 ]]
+ exit
I have searched the past issues and have tried the following settings to resolve:
- Using default settings
- Clearing browser cache
- Using a different browser
- Debian 11
- Debian 12
- Ubuntu 23.04
- Restarting the proxmox host
When I use ubuntu, I get the /root/.bashrc: line 6: PS1: unbound variable error. All other times, I get the error posted here.
If relevant, including screenshots or a code block can be helpful in clarifying the issue.
No response
Please provide detailed steps to reproduce the issue.
- Run the nginxproxymanager script with any settings on a proxmox 8 host
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 16 (8 by maintainers)
Hey, I was having the exact same issue. I tried everything, even connecting a keyboard and a monitor to the server, it always failed in the nvm part. The only way I was able to proceed was by manually installing nvm while the script is running (I had to try executing it multiple times, because curl and git are required and were being installed), before the Node.Js part. Thanks @point-source ! Thanks for your scripts @tteck !
Given your existing connection method, you might encounter this issue every time the
.bashrcfile needs to be reloaded. Fortunately, only a handful of scripts necessitate this action.