Skip to content

Commit 31e20fe

Browse files
akash1810jacobwinch
andauthoredMay 16, 2022
Rollback to nvm 0.33.11 and specify default Node version (16) (#732)
* Revert "install latest nvm from an up to date source" This reverts commit de105e1. * fix: Don't install a system version of Node `nvm --lts` appears to be installing Node v18. Node 18 has switched the version of `glibc`, and the version it wants does not seem to be present on the AMI. Given Node 18 enters a formal LTS in Oct 2022, and builds should be individually managing their node version, this change removes any system wide install of node. See: nodejs/node#42659 * Explicitly install latest Node 16 via NVM * Specify default alias We were getting errors when attempting to start TeamCity: N/A: version "N/A -> N/A" is not yet installed. teamcityagent.service: Control process exited, code=exited status=3 You need to run "nvm install N/A" to install it before using it. It looks like the default version is not wired up correctly: nvm ls v16.15.0 default -> lts/Gallium (-> N/A) Co-authored-by: Jacob Winch <[email protected]>
1 parent 64e57c2 commit 31e20fe

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
 
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
nvm_version: 0.39.1
2+
nvm_version: 0.33.11

‎roles/teamcity-agent/tasks/main.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,11 @@
6666
- name: install nvm
6767
shell: |
6868
set -e
69-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v{{nvm_version}}/install.sh | bash
69+
curl -o- https://raw.githubusercontent.com/creationix/nvm/v{{nvm_version}}/install.sh | bash
7070
source /opt/teamcity/.nvm/nvm.sh
71-
nvm install node
72-
nvm install --lts
71+
# Gallium is Node 16
72+
nvm install --lts=Gallium
73+
nvm alias default 16
7374
become: yes
7475
become_user: teamcity
7576
args:

0 commit comments

Comments
 (0)
Please sign in to comment.