Skip to main content

Questions tagged [monorepo]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Deploying express api from monorepo failing on render

I am trying to deploy my express backend on render as a web service from a mono repo (github link of repo : GitHub - kartik-chausali/code-arena-turbo) this backend uses different modules which i ...
0 votes
0 answers
21 views

nx monopero + react native error Metro Cannot resolve fs

I use NX monorepo with Next.js and React Ntive. And using shared-lib. I am getting an error from metro when trying to use something from shared-lib im my application. For example import SVG or ...
0 votes
0 answers
12 views

Trouble setting up a shared component (in a different package) for 1 or more React Native Apps

I am running into trouble with a React Native app. Right now I have this file structure: Outer Folder Packages ----ReactNativeApp1 --------All standard files for React Native App ----shared (Folder ...
4 votes
2 answers
6k views

Debug Next.js App with VSCode in NX monorepo

I'm currently trying to debug a Next.js Application inside a NX monorepo. I have enabled the Auto Attach setting in VSCode's User Settings. When I start the Application using the serve command, I can ...
9 votes
1 answer
2k views

Running ESLint in project subdir yields "heap out of memory"

If I run eslint . from my project-root, it prints all errors and warnings to the console, as I would expect it to. However, when I cd into a subdirectory of the project, eslint . yields the following ...
0 votes
0 answers
12 views

How can I keep standalone lockfiles working in a mono-repo managed by Yarn?

I'm using a monorepo with Yarn workspaces as a means to manage a dozen or so WordPress plugins. Each plugin needs to be able to build (webpack) and deploy independently. The issue happens occasionally ...
0 votes
0 answers
18 views

Vitest fails when testing a typescript file

So I have a monorepo with a package called "types". In this package I have installed vitest and I want to test this file: src/marketplaces.ts import { z } from 'zod'; export const ...
1 vote
1 answer
24 views

How to know function call came from which application in angular monorepo nx?

In monorepo nx angular application I have 2 application A & B and a common shared component C. I've inserted C in both application using components app selector. I want to know apart from URL is ...
0 votes
1 answer
1k views

NX: Library build fails in case of sibling library as dependency

I have an NX monorepo workspace. I have developed a library "A" with a grouping folder to contains a bunch of different domain features "x", "y", "z" and I can ...
2 votes
1 answer
854 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 ...
5 votes
1 answer
15k views

Docker builds for a monorepo environment

Basically, both services foo and bar depend on a common library. Let's assume that the common package has already been published to the npm registry. | ├── packages | ├── common | | ├── src | ...
0 votes
4 answers
5k views

Tailwind config for packages in monorepo

I am trying to create a monorepo using Vite, React, TailwindCSS and pnpm (repository here). My tailwind config files are under src/apps/app. When using the Page from src/packages/feat-page, the ...
0 votes
0 answers
18 views

How to Resolve Tailwind CSS Specificity Issues in a Turborepo with Module Federation?

I have a project setup using Turborepo with the following structure: apps/ ├── layout ├── app1 ├── app2 ├── app3 packages/ ├── ui ├── tailwind-config ├── eslint-config ├── other-configs The apps/ ...
0 votes
1 answer
81 views

How to handle global monorepo dependencies when publishing to npm?

Imagine the following monorepo structure: - package.json // Root level package.json with global `lodash` dependency - packages - packageA - package.json // Uses global `lodash` but it is not ...
0 votes
0 answers
13 views

Is there a way to configure Nx to always run tasks from the project root rather than workspace root?

I have a mixed repo with some non-JS projects that use make for running tasks. I am integrating these into an Nx monorepo by simply defining the tasks in each project.json using the generic nx:run-...
7 votes
2 answers
8k views

How to use monorepo packages with nestjs using turborepo?

Here's what a real simple monorepo with nestjs using turborepo looks like: . ├── README.md ├── apps │   └── nest │   ├── README.md │   ├── nest-cli.json │   ├── package.json │   ├── ...
0 votes
0 answers
17 views

NX - Monorepo - migrating outside NX for purpose of open-sourcing non-application projects, while retaining dev experience

I've been using NX monorepo at work and for personal projects for about 2 years and I am still very happy with it. I would soon like to release a few libraries like testing tools, templating library, ...
0 votes
0 answers
24 views

pnpm align dependency versions across packages in monorepo

I'm building an extension for Prisma, and I've put two workspaces into a monorepo, one for the package itself, and one for development testing: /package.json /pnpm-workspace.yaml /package/package.json ...
0 votes
0 answers
16 views

Migrate Express Backend and React Native Frontend to Monorepo for TRPC

I have a node.js Express (Typescript) backend. I also have a React Native frontend. These exist in separate repos. I want to use TRPC: https://trpc.io/ to achieve end to end type safety. To my ...
0 votes
0 answers
57 views

"ERR_MODULE_NOT_FOUND" error when using TypeScript project references

I'm trying to implement TypeScript's project references to be able import code from a common package between my application's services. This is how the tsconfig.json of the shared package (...
0 votes
0 answers
23 views

TS unable to locate module when entry is in a higher-level directory than module's package.json

I'm setting up a TS monorepo, the structure looks like this: /apps /web /libs /hello /dist What I'm trying to accomplish is have all of the libraries build their output to the root-level dist ...
-1 votes
0 answers
43 views

avoiding barrel files in a typescript monorepo bundled with vite

Popular wisdom and guidance advise avoiding barrel files, but I am struggling to do so without using wild cards in tsconfig paths and package.json exports. I have a monorepo that has a tsconfig-base....
0 votes
0 answers
220 views

UI package in Turborepo produces TS error intermittently - Could not find a declaration file for module

I'm trialling a Turborepo at the moment, and struggling with a TS error I can't seem to solve. The error reads: Could not find a declaration file for module '@myapp/ui'. 'C:/myapp/packages/ui/dist/...
5 votes
9 answers
7k views

Angular monorepo error TS6059: File 'ng-youtube-api.service.ngtypecheck.ts' is not under 'rootDir'. 'rootDir' is expected to contain all source files

I've created 3 angular libraries/packages: @example/ng-youtube-player containing a YoutubePlayerComponent and YoutubeApiService @example/ng-dailymotion-player containing a DailymotionPlayerComponent ...
0 votes
1 answer
47 views

how to import apps in packages - turbo monorepo

I'm trying to import some backend methods apps/backend/... into my packages/graphql because my graphql resolvers actualy calls backend routes, but I can't seem to see how in turbo monorepo ...
0 votes
0 answers
83 views

Error: Cannot find module 'metro/src/lib/TerminalReporter' when building Expo app in a monorepo

I am encountering an issue when trying to build my Expo app using npx expo run:ios in a Turborepo monorepo setup. The error message I receive is: Error: Cannot find module 'metro/src/lib/...
3 votes
1 answer
318 views

How to create an application in Nx that has no pre-existing generator?

The various community Vue application generators for Nx will not work for me, so I'd like to start a new empty app in Nx. But it seems a pre-existing generator is always required (?). When I don't ...
4 votes
1 answer
322 views

How to specify dist folder as source for publishing lib to npm registry from NX monorepo?

I'm new for monorepos and especially NX. At the moment I'm trying to create a lib and publish it to npm registry. For that I use NX console to generate publishable lib and publish it to npm registry. ...
0 votes
1 answer
31 views

How to set up an nx workspace with angular 14

I am trying to migrate to an nx workspace. I have 2 apps and 2 libraries all using angular version 14. I am currently locked into this angular version as I am using ionic 5. I've tried multiple ways ...
-1 votes
0 answers
38 views

Monorepo architecture is not working for react@18 version. Showing blank page

I am working on monorepo architecture (using turborepo) where in monorepo folder there is react-student folder and angular-trainer folder. In react-student folder there is dockerfile to run react on ...
0 votes
3 answers
2k views

Monorepo *nx affected:build* develop branch problem - JENKINS

I have multibranch pipeline created on my Jenkins server. I have a full stack project made in node.js (nest.js and angular app as frontend). One every push i build the app that is affected by the ...
7 votes
1 answer
2k views

How to setup lint-staged with turbo monorepo?

I have a turbo monorepo, with packages/... and apps/app-a, apps/app-b . I have set up husky pre-commit hook, which will run pnpm dlx lint-staged I want lint-staged to run lint script from the closest ...
12 votes
2 answers
9k views

How to use Turborepo for an existing react app created with Create React App in order to make it a monorepo?

I have a fun project made with create react app. I want to convert the same application to a browser extension. This idea forces me to make the project a mono repo. Because in both applications, I ...
0 votes
1 answer
67 views

`RollupError: [commonjs--resolver] Expression expected` when building the project in Vite

I have a project that includes a React Native project and a Vite (React Native Web) project in a monorepo using pnpm. When I build the Vite project, I am getting the error: error during build: ...
0 votes
0 answers
25 views

Turborepo / Lamda / Dockerfile - Error Not Finding Internal Package

I have a monorepo using Turborepo that has a Lambda function that depends on an internal package. Basically, something like the following structure... The service is "resize" and it depends ...
1 vote
1 answer
4k views

pnpm installations cause pnpm-lock.yaml file to update each time

I have a pnpm monorepo, and I'm trying to bring my project to a state where my pnpm install command doesn't update the lock file. As I understand, for example, after I change some package version in a ...
0 votes
1 answer
65 views

Nodejs Monorepo with Azure Functions fails at runtime for func start

I have a nodejs typescript monorepo set up in the below structure libraries/ lib1/ lib2/ package.json tsconfig.json web-api/ function1/ function.json index.ts function2/ ...
0 votes
0 answers
32 views

How to debug a yarn workspaces webpack based TypeScript monorepo in WebStorm

Given a yarn workspaces with an app and multiple libraries all built with webpack 5, how do I debug with WebStorm or IntelliJ so that I can hit a breakpoint in a library? I'm hosting with webpack-dev-...
0 votes
1 answer
5k views

Understanding "baseUrl" and "paths" in TypeScript with * glob

I have a monorepo created with yarn workspaces and the following folder structure: ├── foo (workspace @project/foo) │ ├── package.json │   └── src │   └── index.ts ├── bar ...
0 votes
0 answers
13 views

Can I enforce pull requests on a repo subtree?

I have a monorepo on github where I would like to enforce pull requests just in a few subtrees (corresponding to a subset of the modules contained in the monorepo). I tried to create a ruleset on ...
0 votes
0 answers
44 views

How to do an incremental migration from a multirepo to a monorepo with yarn workspaces?

I have a multirepo project. It has an "app" repository that has multiple dependencies. These other dependencies have dependencies themselves. I would like to migrate from a multirepo to a ...
9 votes
1 answer
23k views

TypeScript: Error: Cannot find module when using paths

I have a monorepo containing the Back-end(NodeJS), Front-end(Angular) and Shared directory (container models shared by the front-end and back-end.) preagree-mono/ preagree-api/ preagree-app/ ...
0 votes
0 answers
142 views

Starting issue using expo of a react native sample from turbo

I have a monorepo react native application sample "turbo-repo" that i created using : npx create-turbo -e with-react-native-web I run the build using the command : npx turbo build Then i ...
1 vote
3 answers
1k views

Angular 17 library and webapp in monorepo: ng build works but ng serve fails with a dependency resolution problem

Problem I have an Angular 17 web app in a monorepo that builds fine with ng build but fails on running ng serve with many “Failed to resolve dependency: , present in ‘optimizeDeps.include’" ...
9 votes
5 answers
12k views

how to delete all node_modules from all packages in npm 7 workspace monorepo

how can I delete all node_modules folders from all packages in an npm 7 workspace? With Lerna we could just execute lerna clean -y but when migrating to native NPM 7+ workspaces, is there some ...
1 vote
0 answers
54 views

Error on app launching using eas build in monorepo

I'm struggling a lot to figure out why do my application fails on iOS. I have a monorepo with the following architecture: - apps/ - app1/ - package.json - eas.json - src/ - ... - ...
3 votes
1 answer
163 views

TSConfig paths and "Unsafe call of an `any` typed value" on imports

I have a method in a service e.g. - // file some-service.ts export const getKey = (key: string) => key; and use it as follows with import alias - import * as someService from '~/shared/services/...
3 votes
1 answer
2k views

How can I find all affected projects via `nx`?

I am using nx to manage a mono repo for typescript projects. I know nx has a command affected which can be used to only on the changed project and other projects that depends on it. It is a nice ...
0 votes
0 answers
44 views

Maintain different Angular Versions in one pnpm Workspace

Currently, I am working on a demo, setting up a Micro Frontend Environment with Angular 16 and Angular 17 apps. I am trying to set these apps up in one workspace: https://github.com/GregOnNet/ng-...
0 votes
0 answers
16 views

Issue where Rollup is running against imported dependencies which are projects in a monorepo

I am trying to implement Rollup and Typescript for a monorepo. I am running into a problem where I am getting Typescript issues from dependancies which they themselves are projects within the monorepo....

1
2 3 4 5
29