RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.51k stars 10.55k forks source link

Rocketchat do not start: Error TypeError: domhandler_1.Document is not a constructor #31030

Closed paologodinho closed 10 months ago

paologodinho commented 11 months ago

Description:

I'm updating my Rocket Chato to the version 6.3.7 but I'm facing issues when I start the application:

Steps to reproduce:

root@rocketchat:/opt/Rocket.Chat# node main.js strict mode: missing type "object" for keyword "additionalProperties" at "#" (strictTypes) strict mode: missing type "object" for keyword "properties" at "#" (strictTypes) strict mode: use allowUnionTypes to allow union type keyword at "#/properties/value" (strictTypes) (node:395805) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.

Please migrate your code to use AWS SDK for JavaScript (v3). For more information, check the migration guide at https://a.co/7PzMCcy (Use node --trace-warnings ... to show where the warning was created) LocalStore: store created at LocalStore: store created at LocalStore: store created at MessageType.render is deprecated. Use MessageType.message instead. livechat_webrtc_video_call {"level":40,"time":"2023-11-21T10:18:34.065Z","pid":395805,"hostname":"rocketchat.dev.ch.hbp.eu","name":"VoIPService","msg":"Voip is not enabled. Cant start the service"} /opt/Rocket.Chat/programs/server/node_modules/fibers/future.js:280 throw(ex); ^

TypeError: domhandler_1.Document is not a constructor at Object.parse [as default] (/opt/Rocket.Chat/programs/server/npm/node_modules/cheerio/lib/parse.js:26:16) at Object.load (/opt/Rocket.Chat/programs/server/npm/node_modules/cheerio/lib/load.js:27:31) at Object. (/opt/Rocket.Chat/programs/server/npm/node_modules/cheerio/lib/index.js:18:26) at Module._compile (internal/modules/cjs/loader.js:1114:14) at Module.Mp._compile (/opt/Rocket.Chat/programs/server/runtime.js:77:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10) at Module.load (internal/modules/cjs/loader.js:979:32) at Module.Mp.load (/opt/Rocket.Chat/programs/server/runtime.js:37:33) at Function.Module._load (internal/modules/cjs/loader.js:819:12) at Module.require (internal/modules/cjs/loader.js:1003:19) at require (internal/modules/cjs/helpers.js:107:18) at Object. (/opt/Rocket.Chat/programs/server/npm/node_modules/@rocket.chat/cas-validate/dist/validate.js:9:19) at Module._compile (internal/modules/cjs/loader.js:1114:14) at Module.Mp._compile (/opt/Rocket.Chat/programs/server/runtime.js:77:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10) at Module.load (internal/modules/cjs/loader.js:979:32) at Module.Mp.load (/opt/Rocket.Chat/programs/server/runtime.js:37:33) at Function.Module._load (internal/modules/cjs/loader.js:819:12) at Module.require (internal/modules/cjs/loader.js:1003:19) at require (internal/modules/cjs/helpers.js:107:18) at Object. (/opt/Rocket.Chat/programs/server/npm/node_modules/@rocket.chat/cas-validate/dist/index.js:17:14) at Module._compile (internal/modules/cjs/loader.js:1114:14) at Module.Mp._compile (/opt/Rocket.Chat/programs/server/runtime.js:77:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10) at Module.load (internal/modules/cjs/loader.js:979:32) at Module.Mp.load (/opt/Rocket.Chat/programs/server/runtime.js:37:33) at Function.Module._load (internal/modules/cjs/loader.js:819:12) at Module.require (internal/modules/cjs/loader.js:1003:19) at require (internal/modules/cjs/helpers.js:107:18) at npmRequire (/opt/Rocket.Chat/programs/server/npm-require.js:111:12) at Module.useNode (packages/modules-runtime.js:751:18) at module (/opt/Rocket.Chat/programs/server/packages/modules.js:200019:8) at fileEvaluate (packages/modules-runtime.js:336:7) at Module.require (packages/modules-runtime.js:238:14) root@rocketchat:/opt/Rocket.Chat#

Expected behavior:

The application Start

Actual behavior:

The application is not staring

Server Setup Information:

Client Setup Information

Additional context

Relevant logs:

hugocostadev commented 11 months ago

Are you still facing this issue? Can you try to upgrade to a different version, please?


Questions? Help needed? Feature Requests?

paologodinho commented 11 months ago

Yes, we are still facing the same issue.

But We adjust one file that make possible we start the application. I will share the file with you.

Our Developer modify this file and the application started. There is a method called parse, probably parsing an object to another, I forced it to return an empty list

11:36 not empty if the doc is not

parse copy.js.txt

rename teh file to js and you will see the modification.

Regards, Paolo

github-actions[bot] commented 10 months ago

This issue has been marked as stale because there has been no further activity in the last 10 days. If the issue remains stale for the next 4 days (a total of 14 days with no activity), then it will be assumed that the question has been resolved and the issue will be automatically closed.

github-actions[bot] commented 10 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.