Ropcketchat problem with npm and @babel/parser

Description

hello i have problem to start Rocketchat, after trying update to newest version;

Server Setup Information

  • Version of Rocket.Chat Server: I don’t know
  • Operating System: centos
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog: n/a
  • NodeJS Version: v12.14.0.
  • MongoDB Version: 3.6.17
  • Proxy: nginx
  • Firewalls involved: no

Any additional Information

==> messages <==
Apr  2 16:46:40 serwer-3 systemd: Reloading.
Apr  2 16:46:40 serwer-3 systemd: Started The Rocket.Chat server.
Apr  2 16:46:41 serwer-3 rocketchat: internal/modules/cjs/loader.js:800
Apr  2 16:46:41 serwer-3 rocketchat: throw err;
Apr  2 16:46:41 serwer-3 rocketchat: ^
Apr  2 16:46:41 serwer-3 rocketchat: Error: Cannot find module '@babel/parser'
Apr  2 16:46:41 serwer-3 rocketchat: Require stack:
Apr  2 16:46:41 serwer-3 rocketchat: - /opt/Rocket.Chat/programs/server/node_modules/reify/lib/parsers/babel.js
Apr  2 16:46:41 serwer-3 rocketchat: - /opt/Rocket.Chat/programs/server/runtime.js
Apr  2 16:46:41 serwer-3 rocketchat: - /opt/Rocket.Chat/main.js
Apr  2 16:46:41 serwer-3 rocketchat: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
Apr  2 16:46:41 serwer-3 rocketchat: at Function.Module._load (internal/modules/cjs/loader.js:690:27)
Apr  2 16:46:41 serwer-3 rocketchat: at Module.require (internal/modules/cjs/loader.js:852:19)
Apr  2 16:46:41 serwer-3 rocketchat: at require (internal/modules/cjs/helpers.js:74:18)
Apr  2 16:46:41 serwer-3 rocketchat: at Object.<anonymous> (/opt/Rocket.Chat/programs/server/node_modules/reify/lib/parsers/babel.js:3:21)
Apr  2 16:46:41 serwer-3 rocketchat: at Module._compile (internal/modules/cjs/loader.js:959:30)
Apr  2 16:46:41 serwer-3 rocketchat: at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
Apr  2 16:46:41 serwer-3 rocketchat: at Module.load (internal/modules/cjs/loader.js:815:32)
Apr  2 16:46:41 serwer-3 rocketchat: at Module.Mp.load (/opt/Rocket.Chat/programs/server/runtime.js:15:31)
Apr  2 16:46:41 serwer-3 rocketchat: at Function.Module._load (internal/modules/cjs/loader.js:727:14) {
Apr  2 16:46:41 serwer-3 rocketchat: code: 'MODULE_NOT_FOUND',
Apr  2 16:46:41 serwer-3 rocketchat: requireStack: [
Apr  2 16:46:41 serwer-3 rocketchat: '/opt/Rocket.Chat/programs/server/node_modules/reify/lib/parsers/babel.js',
Apr  2 16:46:41 serwer-3 rocketchat: '/opt/Rocket.Chat/programs/server/runtime.js',
Apr  2 16:46:41 serwer-3 rocketchat: '/opt/Rocket.Chat/main.js'
Apr  2 16:46:41 serwer-3 rocketchat: ]
Apr  2 16:46:41 serwer-3 rocketchat: }
Apr  2 16:46:41 serwer-3 systemd: rocketchat.service: main process exited, code=exited, status=1/FAILURE
Apr  2 16:46:41 serwer-3 systemd: Unit rocketchat.service entered failed state.
Apr  2 16:46:41 serwer-3 systemd: rocketchat.service failed.

Can you elaborate on what you did? You indicated that you deployed via snap, which would mean automatic updates.

Nevermind, i reinstall system after 5hours fighting with npm :slight_smile:
On fresh system, I have other problem

Apr 3 02:24:13 serwer-3 rocketchat[8886]: <— Last few GCs —>

Apr 3 02:24:13 serwer-3 rocketchat[8886]: [8886:0x48f5ee0] 32271638 ms: Mark-sweep 2030.6 (2059.5) -> 2030.6 (2059.5) MB, 335.4 / 0.2 ms (average mu = 0.262, current mu = 0.000) last resort GC in old space requested

Apr 3 02:24:13 serwer-3 rocketchat[8886]: [8886:0x48f5ee0] 32271926 ms: Mark-sweep 2030.6 (2059.5) -> 2030.6 (2059.5) MB, 288.1 / 0.2 ms (average mu = 0.160, current mu = 0.000) last resort GC in old space requested

Apr 3 02:24:13 serwer-3 rocketchat[8886]: <— JS stacktrace —>

Apr 3 02:24:13 serwer-3 rocketchat[8886]: ==== JS stack trace =========================================

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 0: ExitFrame [pc: 0x12f622d]

Apr 3 02:24:13 serwer-3 rocketchat[8886]: Security context: 0x19f9608808a1

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 1: slice [0x229f039d6631] [buffer.js:~585] [pc=0xaf0e98e64c6](this=0x0cbbadab4ac9 ,0x213d8319c6f1 ,3779130,3852944)

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 2: deserializeObject(aka deserializeObject) [0x13940c7b3991] [/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/deserializer.js:~4…

Apr 3 02:24:13 serwer-3 rocketchat[8886]: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 1: 0x9da7c0 node::Abort() [/usr/local/bin/node]

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 2: 0x9db976 node::OnFatalError(char const*, char const*) [/usr/local/bin/node]

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 3: 0xb39f1e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 4: 0xb3a299 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 5: 0xce5635 [/usr/local/bin/node]

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 6: 0xcf54fd v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/usr/local/bin/node]

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 7: 0xcc3757 v8::internal::factory::NewRawTwoByteString(int, v8::internal::AllocationType) [/usr/local/bin/node]

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 8: 0xcc383c v8::internal::factory::NewStringFromUtf8(v8::internal::Vector const&, v8::internal::AllocationType) [/usr/local/bin/node]

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 9: 0xb5239f v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::NewStringType, int) [/usr/local/bin/node]

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 10: 0xa91370 node::StringBytes::Encode(v8::Isolate*, char const*, unsigned long, node::encoding, v8::Localv8::Value*) [/usr/local/bin/node]

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 11: 0x9b5126 [/usr/local/bin/node]

Apr 3 02:24:13 serwer-3 rocketchat[8886]: 12: 0x12f622d [/usr/local/bin/node]

Apr 3 02:24:14 serwer-3 systemd[1]: rocketchat.service: Main process exited, code=killed, status=6/ABRT

Apr 3 02:24:14 serwer-3 systemd[1]: rocketchat.service: Unit entered failed state.

Apr 3 02:24:14 serwer-3 systemd[1]: rocketchat.service: Failed with result ‘signal’.