Unable to start Server due to Node mismatch

Description

I wanted to upgrade my Rocket Chat server to the latest version. I’m almost done, but when trying to start the server it fails with “Server error” message informing me that my Node JS is invalid. I checked documentation and it looks to me that I’m using correct version.

Server Setup Information

  • Version of Rocket.Chat Server: 3.10.5 and 3.11
  • Operating System: Debian v10
  • Deployment Method: Manual, I followed: Rocket.Chat on Debian - Rocket.Chat Docs
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: 12.18.4
  • MongoDB Version: 3.6
  • Proxy: none
  • Firewalls involved: none

Any additional Information

/opt/Rocket.Chat# MONGO_URL=mongodb://localhost:27017/rocketchat ROOT_URL=https://shhhhhh.co PORT=3000 /usr/local/bin/node /opt/Rocket.Chat/main.js
LocalStore: store created at
LocalStore: store created at
LocalStore: store created at
Setting default file store to GridFS
{"line":"120","file":"migrations.js","message":"Migrations: Not migrating, already at version 213","time":{"$date":1612352254543},"level":"info"}
Loaded the Apps Framework and loaded a total of 0 Apps!
Using GridFS for custom sounds storage
Using GridFS for custom emoji storage
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Updating process.env.MAIL_URL
➔ server.js:204 System ➔ error
➔ +-------------------------------------------------+
➔ |                   SERVER ERROR                  |
➔ +-------------------------------------------------+
➔ |                                                 |
➔ |  Rocket.Chat Version: 3.10.5                    |
➔ |       NodeJS Version: 12.18.4 - x64             |
➔ |      MongoDB Version: 3.6.21                    |
➔ |       MongoDB Engine: wiredTiger                |
➔ |             Platform: linux                     |
➔ |         Process Port: 3000                      |
➔ |             Site URL: https://shhhhhhh.co     |
➔ |     ReplicaSet OpLog: Enabled                   |
➔ |          Commit Hash: 1e36f41838                |
➔ |        Commit Branch: HEAD                      |
➔ |                                                 |
➔ |  YOUR CURRENT NODEJS VERSION IS NOT SUPPORTED,  |
➔ |  PLEASE UPGRADE / DOWNGRADE TO VERSION 8.X.X    |
➔ |                                                 |
➔ +-------------------------------------------------+

I had a look at the code on Github and realized that I can either bypass this failure or get rid of the issue by modifying the contents of /opt/Rocket.Chat/.node_version.txt so that it matches my version of Node. Not sure why this is needed, but I can confirm it works then. Maybe some integration hickup with one of the third party apps you guys are using?