RocketChat / RocketChat/Rocket.Chat

Manual Installation triggering devDependency rebuild

Open
#27,780 0 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:

During manual installation (the same as using docker) there seems to be a misleading conception to execute a npm rebuild for any (I mean: ANY!) development dependency. As we found out the other day, it is simpler and thus more efficient to just rebuild the Meteor packages with, than the complete npm folder during installation process.

Steps to reproduce:
  1. Download and extract the *.tar
  2. run npm install --production
Expected behavior:

Npm to rebuild just dependencies, that are needed to run the server. So no Dev Dependencies, which are not used during execution in a production environment

Actual behavior:

NPM will try to rebuild all dev dependencies in npm folder. In our Case it was Cypress, that broke the complete installation, thus it is not needed in any way to run the server application.

Server Setup Information:
  • Version of Rocket.Chat Server: 4.8.7
  • Operating System: SLES
  • Deployment Method: tar
  • Number of Running Instances: 8
  • DB Replicaset Oplog:
  • NodeJS Version: 14
  • MongoDB Version: 4.2
Additional context

Is it mandatory to install even dev dependencies into a production environment? The NPM rebuild process is quite powerful and must not include any dependency, that is not needed afterwards.

Relevant logs:

as we removed the irrelevant entries from npm-rebuilds.json we do not have any relevant logs to show. If anyone is interested in a smaller installation config, please let me know.

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

Read npm-rebuilds.json and trace the manual tar installation invoked by npm install --production. Confirm that production installation rebuilds only dependencies needed to run the server and no longer attempts development dependencies such as Cypress.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, node.js
Domain
build-system, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.