Building a community edition package without any non-MIT source?


I’m trying to get a Rocket.Chat server to run without including any of the non-MIT licensed code, but I’m having trouble with errors regarding missing files from the ee-directory.

Is there any guide or instructions on steps needed to achieve an 100% MIT build of the server?

Server Setup Information

  • Version of Rocket.Chat Server: 4.6.1 (checked out tag in git)
  • Operating System: Ubuntu 20.04.3
  • Deployment Method: git clone, rm -rf ee, meteor npm install, meteor run
  • NodeJS Version: v14.18.3

Any additional Information

I20220412-07:48:49.388(0)? [2022-04-12T07:48:49.374Z] ERROR (System/38923 on safedev10wc1): Invalid setting code SMS_Mobex_from_number: Setting SMS_Mobex_from_number is of type int but got string
W20220412-07:48:54.548(0)? (STDERR) /home/user/.meteor/packages/meteor-tool/.
W20220412-07:48:54.549(0)? (STDERR)                                             throw(ex);
W20220412-07:48:54.550(0)? (STDERR)                                             ^
W20220412-07:48:54.550(0)? (STDERR)
W20220412-07:48:54.551(0)? (STDERR) Error: Cannot find module '../../../../ee/app/license/server'
W20220412-07:48:54.554(0)? (STDERR)     at makeMissingError (packages/modules-runtime.js:222:12)
W20220412-07:48:54.555(0)? (STDERR)     at Module.resolve (packages/modules-runtime.js:228:17)
W20220412-07:48:54.555(0)? (STDERR)     at Module.moduleLink [as link] (/home/user/.meteor/packages/modules/.
W20220412-07:48:54.556(0)? (STDERR)     at module (app/statistics/server/lib/statistics.ts:1:21)
W20220412-07:48:54.559(0)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:336:7)
W20220412-07:48:54.559(0)? (STDERR)     at Module.require (packages/modules-runtime.js:238:14)
W20220412-07:48:54.560(0)? (STDERR)     at Module.moduleLink [as link] (/home/user/.meteor/packages/modules/.
W20220412-07:48:54.560(0)? (STDERR)     at module (app/statistics/server/functions/getLastStatistics.js:1:220)
W20220412-07:48:54.561(0)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:336:7)
W20220412-07:48:54.561(0)? (STDERR)     at Module.require (packages/modules-runtime.js:238:14)
W20220412-07:48:54.561(0)? (STDERR)     at Module.moduleLink [as link] (/home/user/.meteor/packages/modules/.
W20220412-07:48:54.562(0)? (STDERR)     at module (app/statistics/server/methods/getStatistics.js:1:94)
W20220412-07:48:54.562(0)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:336:7)
W20220412-07:48:54.562(0)? (STDERR)     at Module.require (packages/modules-runtime.js:238:14)
W20220412-07:48:54.563(0)? (STDERR)     at Module.moduleLink [as link] (/home/user/.meteor/packages/modules/.
W20220412-07:48:54.567(0)? (STDERR)     at module (app/statistics/server/index.js:1:8)

Currently we don’t have a guide for this. This is something we do want to make easier as we know this is something people want.

Right now are priorities are on feature work and stability. We absolutely welcome Pull Requests for changes to make this easy.

My guess is can implement another folder with the function called in the ee and then just swap the import. But to make that easy and repeatable. Ideally where can be flipped at build time between the two… might take some work figuring out how to make it happen.

If you or anyone else wants to take a crack at it please feel free. :pray:

1 Like

Do you currently have a community edition? Is it possible to use the version with the ee code without purchasing a license and self-host it? This is not easy to understand from the licenses in the source code since source from the ee directory is used during runtime. The standard snap and docker images also this ee source code.