RocketChat / RocketChat/Rocket.Chat

Error updating from rocket.chat_latest.tgz from from 7.2.1 to 7.7.0 python 3 version

Open
#36,145 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

While trying to update Rocket Chat from 7.2.1 to 7.7.0 , it's giving an error.

The problem seems to be related to Python 3 version

I had to update Python3 v=3.7.3 and had to update to 3.8.2 using:
curl -O https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz
tar -xf Python-3.8.2.tar.xz
make -j 2 (VM have 2 cores)
sudo make altinstall
and run:
sudo update-alternatives --config python3
Only after that, I managed to complete the update!

Suggestion to fix:
add python minimal version to
https://docs.rocket.chat/docs/deploy-on-debian
and Engine versions in https://github.com/RocketChat/Rocket.Chat/releases

Steps to reproduce:
  1. having python3 --version = Python 3.7.3
  2. sudo systemctl stop rocketchat.service
  3. sudo mv /opt/Rocket.Chat{,old_7.2.1}
  4. curl -L https://releases.rocket.chat/latest/download -o /tmp/rocket.chat_latest.tgz
  5. sudo n 22.14.0
  6. tar xzf /tmp/rocket.chat_latest.tgz -C /tmp
  7. cd /tmp/bundle/programs/server
  8. npm install --production or npm install or npm i
Expected behavior:

install without errors

Actual behavior:

fail to install

Server Setup Information:
  • Version of Rocket.Chat Server: 7.2.1 -> 7.7.0
  • License Type: Starter
  • Number of Users: 12
  • Operating System: Debian GNU/Linux 10 (4.19.0-23-amd64)
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog: oplog Enabled
  • NodeJS Version: v22.14.0
  • MongoDB Version: MongoDB 6.0.16-13
Client Setup Information
  • Desktop App or Browser Version:
  • Operating System:
Additional context

install
node npm-rebuild.js

rebuilt dependencies successfully
rebuilt dependencies successfully
rebuilt dependencies successfully
rebuilt dependencies successfully
rebuilt dependencies successfully
rebuilt dependencies successfully
npm error code 1
npm error path /tmp/bundle/programs/server/npm/node_modules/gc-stats
npm error command failed
npm error command sh -c node-gyp-build
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@10.2.0
npm error gyp info using node@22.14.0 | linux | x64
npm error gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
npm error gyp info spawn /usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/tmp/bundle/programs/server/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/tmp/bundle/programs/server/npm/node_modules/gc-stats/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/tmp/bundle/programs/server/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/user/.cache/node-gyp/22.14.0/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/home/user/.cache/node-gyp/22.14.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/tmp/bundle/programs/server/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/home/user/.cache/node-gyp/22.14.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/tmp/bundle/programs/server/npm/node_modules/gc-stats',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error Traceback (most recent call last):
npm error File "/tmp/bundle/programs/server/node_modules/node-gyp/gyp/gyp_main.py", line 42, in
npm error import gyp # noqa: E402
npm error File "/tmp/bundle/programs/server/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 9, in
npm error import gyp.input
npm error File "/tmp/bundle/programs/server/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 8, in
npm error import gyp.common
npm error File "/tmp/bundle/programs/server/node_modules/node-gyp/gyp/pylib/gyp/common.py", line 435
npm error if CC := os.environ.get("CC_target") or os.environ.get("CC"):
npm error ^
npm error SyntaxError: invalid syntax
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: gyp failed with exit code: 1
npm error gyp ERR! stack at ChildProcess. (/tmp/bundle/programs/server/node_modules/node-gyp/lib/configure.js:317:18)
npm error gyp ERR! stack at ChildProcess.emit (node:events:518:28)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm error gyp ERR! System Linux 4.19.0-23-amd64
npm error gyp ERR! command "/usr/local/bin/node" "/tmp/bundle/programs/server/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /tmp/bundle/programs/server/npm/node_modules/gc-stats
npm error gyp ERR! node -v v22.14.0
npm error gyp ERR! node-gyp -v v10.2.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: /home/user/.npm/_logs/2025-06-04T01_33_47_637Z-debug-0.log
npm error code 1
npm error path /tmp/bundle/programs/server
npm error command failed
npm error command sh -c node npm-rebuild.js
npm error A complete log of this run can be found in: /home/user/.npm/_logs/2025-06-04T01_33_42_475Z-debug-0.log

Relevant logs:

npm error gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
(...)
npm error if CC := os.environ.get("CC_target") or os.environ.get("CC"):
npm error ^
npm error SyntaxError: invalid syntax

This line uses the walrus operator (:=), which was introduced in Python 3.8.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the Debian deployment documentation and the Rocket.Chat releases page linked in the issue, then compare their stated requirements with the failed npm install output. Document the minimum Python version and relevant engine versions so the 7.2.1-to-7.7.0 upgrade prerequisites are clear; verify that the reported Python 3.7.3 failure is represented.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, python
Domain
devops, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.