Questions tagged [monorepo]

A monorepo is a single repository containing more than one project (in contrast to the single-repository-per-project approach).

This definition is reduced from the Atlassian blog entry:

Definitions vary, but we define a monorepo as follows:

  • The repository contains more than one logical project (e.g. an iOS client and a web-application)
  • These projects are most likely unrelated, loosely connected or can be connected by other means (e.g via dependency management tools)

(for more, click on their link). Monorepos are not limited to ; any system can hold a monorepo.

516 questions
35
votes
3 answers

How to build a docker image from a nodejs project in a monorepo with yarn workspaces

We are currently looking into CI/CD with our team for our website. We recently also adapted to a monorepo structure as this keeps our dependencies and overview a lot easier. Currently testing etc is ready for the CI but I'm now onto the deployment.…
33Fraise33
  • 471
  • 5
  • 6
27
votes
1 answer

How to manage SCSS stylesheets across a monorepo with different libraries sharing variables?

I have an angular monorepo set up via Nrwl and am using Angular Material's theming, which uses SASS. I want the SCSS source files to import at the project level where I'll override default color variables for theming. The problem I'm running into is…
Kevin Beal
  • 8,374
  • 9
  • 53
  • 76
22
votes
1 answer

Yarn workspace, react, monorepo issue with conflict library version

I'm experimenting with yarn workspace monorepo. It is consisting of a TestProject created with create-react-app, and a SharedLib1 which is created with create-react-library. TestProject imports code from SharedLib1. The problem being, TestProject…
Xun Yang
  • 3,707
  • 7
  • 33
  • 54
21
votes
3 answers

GitHub Cloud Build Integration with multiple cloudbuild.yamls in monorepo

GitHub's Google Cloud Build integration does not detect a cloudbuild.yaml or Dockerfile if it is not in the root of the repository. When using a monorepo that contains multiple cloudbuild.yamls, how can GitHub's Google Cloud Build integration be…
sabrehagen
  • 1,225
  • 11
  • 33
19
votes
1 answer

How to version products inside monorepo?

I have been educating myself about monorepos as I believe it is a great solution for my team and the current state of our projects. We have multiple web products (Client portal, Internal Portal, API, Core shared code). Where I am struggling to find…
18
votes
2 answers

Share codebase using common Sdk module in create react app Reactjs application

I want to start a new app that will have both web and reactnative interfaces. I decided to move all business -non enviroment dependent- code into a third package -aka sdk- that i can share between both react & react native . So my project now has 4…
Zalaboza
  • 8,143
  • 15
  • 64
  • 130
18
votes
1 answer

Install package from lerna-managed monorepo via git URL

I am using yarn for my project. My project has a dependency which happened to be a subpackage of larger monorepo maintained by lerna. The subpackage was updated but not published yet and I need that unpublished code. Is there any way to install…
Max Komarychev
  • 2,676
  • 1
  • 18
  • 30
17
votes
2 answers

How Should VSCode Be Configured To Support A Lerna Monorepo?

I have a lerna monorepo containing lots of packages. I'm trying to achieve the following: Ensure that VSCode provides the correct import suggestions (based on package names, not on relative paths) from one package to another. Ensure that I can…
Undistraction
  • 38,727
  • 46
  • 165
  • 296
17
votes
4 answers

Typescript: Yarn Workspaces IDE Support (IntelliJ, VSCode ...)

Working on a larger typescript project we decided to move the code to a monorepo with yarn workspaces. We use webpack to build and bundle and everything works well (especially the linking between local modules/packages). Since yarn workspaces will…
16
votes
1 answer

Angular + Jest: Can't resolve all parameters for AppComponent: (?)

I am operating inside a Typescript Monorepo. I want to add an Angular 8 frontend with Jest testing to the Monorepo. But I am encountering some issues. I am using Angular CLI: 8.3.5 What I did I will use this repository as a starting point! 1.…
Florian Ludewig
  • 1,255
  • 6
  • 28
  • 90
16
votes
4 answers

nohoist with workspaces still hoisting

Inside my Monorepo I have one packages in which I want all the dependencies inside its node_modules. But whatever I do, it's node_modules remains empty. So, for the purpose of my question I was able to reproduce the issue with the following…
Jeanluca Scaljeri
  • 19,619
  • 37
  • 147
  • 259
16
votes
3 answers

Firebase Functions with Yarn workspaces

We're starting to adopt a monorepo setup using yarn workspaces and we'd like to have our firebase functions inside it. The repo structure is something like: repo node_modules <- all dependencies packages core commom …
16
votes
0 answers

With Yarn workspaces, how can compiled binaries be linked to the workspace post-compilation?

Context Yarn workspaces provide for a convenient mono-repo-like functionality where packages are automatically linked. I.e. they can require/import each other, and their binaries are linked and accessible from the workspace root. An…
Tom
  • 8,437
  • 26
  • 122
  • 217
15
votes
3 answers

Jenkins multibranch pipeline only for subfolder

I have git monorepo with different apps. Currently I have single Jenkinsfile in root folder that contains pipeline for app alls. It is very time consuming to execute full pipeline for all apps when commit changed only one app. We use GitFlow-like…
mrzodiak
  • 357
  • 1
  • 6
  • 14
14
votes
2 answers

How to deploy one app from a large monorepo with dependencies to packages in the same repo to google app engine?

I have a large node.js monorepo with several applications and packages and inter dependencies. It is all managed with yarn workspaces and a little bit of lerna. Everything works great for me, however I am having trouble trying to deploy one of the…
1
2 3
34 35