Questions tagged [monorepo]
A monorepo is a single repository containing more than one project (in contrast to the single-repository-per-project approach).
1
vote
0answers
16 views
How to get create-react-app test in a typescript (babel) based monorepo
I've taken the example at
https://github.com/serhii-havrylenko/monorepo-babel-ts-lerna-starter, (lerna, yarn workspaces, typescript and babel transpilation based monorepo) and added a create-react-...
1
vote
0answers
18 views
npm publish only if changed in angular monorepo
I have an angular monorepo with an "app" and a library, which is published as it's own npm package. This is done automatically on a CI environment. Until now, the library and the app have been ...
3
votes
0answers
49 views
NPM update and outdated with local paths using file:
Running npm update --depth=9999 or npm outdated --depth=9999 skips local path dependencies.
I assumed they would act as any other published packages.
We run commands from the root of monorepo:
@org/...
0
votes
0answers
24 views
Passing all node_modules path to AWS CodeBuild cache
Currently I'm using AWS CodeBuild to deploy my monorepo project and I'm trying to use its cache properties. I want to cache my node_modules folder and my buildspec.yml is:
version: 0.2
phases:
...
0
votes
1answer
39 views
Unable to configure mobx in monorepo (using yarn workspaces)
I am trying to setup a monorepo with react and react native app using a yarn workspaces.
My problem is with mobx (and react-mobx) library. When I use it in the shared package it does not work.
Here ...
3
votes
0answers
36 views
VSCode - Lerna - Typescript - Monorepo Code Navigation
We have a monorepo for all our Javascript related SDKs here at Sentry.
https://github.com/getsentry/sentry-javascript
If you clone this repo, set it up properly with
yarn install
and then open any ...
0
votes
0answers
16 views
Granular access to directories within monorepo
I've been reading about the advantages of monorepos, but haven't yet found a mitigation for the following problem:
Let's say an organization has a monorepo for a client/server web application. They ...
3
votes
1answer
174 views
Webpack Cannot Resolve node_modules lazy assets
I'm working on a vuejs project and we're trying to use external vue cli applications as libraries. In these libraries we want to be able to export a router config, which lazy loads the components ...
0
votes
0answers
34 views
yarn workspace unresolved imports
I am attempting to migrate a few separate repos into a monorepo that's managed through yarn workspaces. I have started with just a single package, and the monorepo so far looks like this:
.
├── ...
0
votes
1answer
94 views
How to use lerna with dotenv package?
I have a monorepo managed using Lerna. I need to use multiple environment variables to start my web server. My npm script to start the server is:
"scripts": {
"dev:start": "lerna run --parallel ...
2
votes
1answer
51 views
Bazel - how to determine targets that need rebuilding?
If I have a monorepo using bazel, how can I get a list of targets that need to be rebuilt for the current commit, compared to the previous commit?
Ideally, there would be a way to work back from the ...
0
votes
0answers
21 views
get “lerna list” output imperatively via lerna api
I wanna get lerna list --json CLI functionality within a node script for various publishing tweaks. I was skimming through the codebase but was not able to find the appropriate API to do the right job:...
1
vote
0answers
61 views
How to deploy monorepo to Heroku?
We are evaluating a migration to a monorepo, while hosting our applications on Heroku. Our source tree looks like this:
.
├── Gemfile
├── Gemfile.lock
├── backend
│ ├── logger
│ │ ├── Gemfile
│ ...
0
votes
0answers
24 views
Single TypeScript configuration + compilation command for all monorepo packages
Let's say I have a monorepo with the following structure:
├── package.json
├── tsconfig.json
└── packages
│── first
│ ├── package.json
│ └── src
│ └── index.ts
│── second
...
0
votes
1answer
25 views
Use local lerna packages as scripts on the root folder
I have several packages inside scripts that used in root.
I use npm link scripts/babel-preset which enables me to use the preset in the main babel.config.js and I wonder if this is the right way to ...
3
votes
1answer
169 views
Lerna. Install dependencies to root project
I have standard Lerna repository like this:
my-repo
- package.json
- packages
- api
- package.json
- web-app
- package.json
If I need same dependency in both packages (for ...
0
votes
1answer
94 views
How Can I Fix VSCode Import Path Suggestions In Lerna Monorepo?
VSCode does a great job with autosuggesting imports, however inside a (Lerna) monorepo it only suggests relative paths from one package to another, for example:
import example from '../../../@scope/...
0
votes
0answers
18 views
Dart build multiple projects
I want to develop a couple of microservices in Dart and would like to use the build package or similar to automate some tasks. In my case, I want to use protocol buffers.
Here's the folder structure ...
0
votes
0answers
25 views
Create-react-app monorepo use source map for local module
I created a monorepo with 2 modules. One is a create-react-app and the other is a package which contains shared components.
After importing a shared component the application starts without any ...
0
votes
1answer
60 views
Create react app can't use local module with flow types
I created a monorepo which will contain 2 apps created with create-react-app and 1 module with shared components. Right now I have 1 create-react-app and the shared component module.
For my project ...
1
vote
1answer
142 views
Configuring Lerna for development environment: using shared package
I have monorepo built with Lerna. It has following structure:
packages
- create-react-app-example
- utils
create-react-app-example is like what create-react-app produces. I.e. it uses webpack ...
6
votes
1answer
140 views
How to Share Build Scripts In Lerna Packages
I have a lerna repo that contains multiple packages organised in the usual structure:
package.json
/packages
- alpha
package.json
- bravo
package.json
- charlie
package.json
I need ...
1
vote
1answer
99 views
vscode launching function app in lerna monorepo
First, I have a monorepo that is structured like so:
repo-name/
packages/
backend/
frontend/
.vscode/
The backend is an Azure function app structured like so:
backend/
...
0
votes
0answers
25 views
How to view project logs after merging a repository into a monorepo?
Suppose I have a monorepo whose directory is named monorepo. In the multirepo, each project has its own directory. Also suppose I have another existing repository named project-a that I wish to place ...
1
vote
1answer
91 views
Vue-CLI, TypeScript and monorepo: how to declare types outside of /src?
How can I point the CLI to look for type declarations in a specific @types folder?
Any *.d.ts created in the /src folder is loaded and works perfectly, but if I move them anywhere outside of /src I ...
1
vote
0answers
197 views
lerna link vs. lerna bootstrap
I have a Lerna project which until recently was using lerna bootstrap --hoist. This worked well but I found the devDependencies in the many sub folders were mostly identical. Upgrading to Lerna v3 I ...
0
votes
2answers
115 views
Can Jenkins build only one python package in a monorepo with multiple packages?
Suppose there is a monorepo with several independently buildable python packages in different directories, something the format shown below, where foo and bar are independently buildable.
Now suppose ...
2
votes
1answer
45 views
How do I deal with committing to multiple branches during development?
I'm looking for uptodate knowledge/best practice/advice.
We are considering moving to a mono-repo for our development. We use Scrum with Stories/Epics/Sprints (I'm not fully uptodate on all the ...
0
votes
1answer
73 views
Codeship independent CI for microservices in monorepo
Currently we have a NodeJS monolith app. The tests run in Codeship and if the tests are green then the code will be deployed to Heroku. That is pretty easy.
So we would like to break up our monolith ...
0
votes
0answers
87 views
Dependency management : Placing of dependencies when using monorepo
I have a project having 4 monorepos and I am using lerna and Yarn workspaces to manage this monorepo.
Project 1/
├── src
│ └── common
│ └── module 1
│ └── module 2
│
api-mocking/
│
Project 2/
├...
0
votes
0answers
59 views
Yarn workspace - can't find build script
I have a Yarn workspace (monorepo) and I am trying to integrate wix/detox.
Followed the procedure from their docs. At first I had a problem with detox-cli because it was installed on the root ...
2
votes
1answer
220 views
Babel: root programmatic options
I seem to absolutely not grasp where to put root programmatic options for the babel.
If I have a monorepo and need to tell the different sub packages that they shall look upwards for my babel.config....
0
votes
0answers
191 views
TypeScript: Easiest way to share code between projects
I'm writing both a React.js app and a React Native app with both of them as separate NPM packages in a Lerna monorepo. What I'm trying to do is have a "shared library" kind of project that would hold ...
0
votes
1answer
32 views
Including bundled code from one project into another with Typescript support
I'm working on a project that has two subprojects: let's call them ProjectA and ProjectB. These are completely different projects, but both are written in Typescript and use webpack as bundler.
...
2
votes
0answers
141 views
implementing monorepo for react and node js web application using lerna
i am trying to build a monorepo , which consist of a react and node js application so the frontEnd folder which is created using react app and backEnd folder which consist of all server code.
I have ...
0
votes
1answer
86 views
Include a package for some libs in Nrwl/Nx workspace
It seems like in a Nrwl/Nx workspace there is only a single package.json file. Now if we have multiple applications, each dependent on different packages, then we have to include all of those package ...
1
vote
0answers
34 views
Maintaining a monorepo for a react project
What I am looking for is a master package/Sdk that defines my features, now I have various build version of this Sdk with customized features, now whenever I add a new feature to the master, it ...
0
votes
0answers
31 views
Node.js & Lerna - Running cucumber-js inside a symbolic link's node_module .bin
I'm new to Node and Lerna. I came from a Java background and I'm trying to create a monorepo node project using Lerna - much like maven and it's modules.
My current project structure looks something ...
0
votes
2answers
457 views
Can I have multiple babel.config.js in a monorepo?
I have a monorepo with the structure like below
babel.config.js
packages/
|---mobile/
|----package.json
|----src/index.js
|---desktop/
|----package.json
|----src/index.js
|---server/
...
0
votes
0answers
32 views
Mono-repo file structure
I am trying to reorganize our repository into a Trunk Based, mono-repo structured repo. It consists of ONLY javascript files broken into categories based on function.
The one thing I am struggling to ...
0
votes
1answer
141 views
TypeScript: Watch & compile multiple directories at the same time (monorepo)
I've been scouring the web for a solution, but haven't found anything worthwhile. Basically, I'm looking for a tool or some way to initiate TypeScript file Watching/Compiling in multiple directories ...
1
vote
1answer
58 views
Building monorepo babel-transpiled node JS application with dependencies
I am working on a project that is hosted as a monorepo. For simplification purposes let's say that inside there are three self-explanatory packages: server, a webapp client and library. The directory ...
0
votes
1answer
347 views
How to structure monorepo for React SSR and API [closed]
I'm trying to understand best practices of structuring monorepos for NodeJS/React projects.
I need:
React SPA with server side rendering.
Backend with Express, MongoDB, mongoose modules etc.
...
0
votes
2answers
46 views
How to avoid error while type-checking in packages which has no tsconfig in lerna monorepo?
I have a lerna monorepo with two different types of packages: js and css.
I need to type check on only those packages which have tsconfig.json.
When I try to run lerna exec tsc, it fails with error ...
-1
votes
2answers
184 views
Lerna-like tools / handling monorepos in Java [closed]
I come from a web-development background and have frequently worked on projects that use Lerna for handling multiple packages from the same repository in JavaScript. As it stands now, I need to ...
1
vote
2answers
601 views
Are there any advantages to using Lerna with Yarn workspaces?
We're in the process of migrating our monorepo to use Lerna.
Lerna supports both NPM and Yarn and furthermore allows configuration of use with Yarn workspaces. It's unclear to me whether Lerna with ...
1
vote
1answer
211 views
How to use Bazel with Node.js
My understanding is that Bazel expects projects to be under a monorepo with a WORKSPACE file at the top-level and BUILD files in every project:
Repo
├── ProjectA
│ └── BUILD
├── ProjectB
│ └── ...
0
votes
1answer
167 views
Spring Cloud Config Git Backend with a monorepo strategy
How do I configure Spring Cloud Config with a Git backend following a monorepo strategy? Say, my repo name is mono-repo, and my application config lies in a feature branch feature/cloud-application-...
1
vote
1answer
404 views
How to use Typescript's references and build mode to compile a mono repo to a serverless bundle?
Typescript recently introduced a new feature to work with monorepos: references. By specifying references you can build all interdependent packages using tsc -b (see also this blog post)
This seems ...
4
votes
3answers
523 views
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 ...