Questions tagged [monorepo]

In opposition to the concept of having one repository per project, a monorepo is an all-inclusive repository consisting of multiple projects.

Guide on importing absolute paths in a @nrwl/nx monorepo

I am currently working on a @nrwl/nx monorepo and I am looking to import folders within the project src using absolute paths. I attempted to specify the baseUrl but had no success. The only solution that did work was adding the path to the monorepo root ts ...

Creating a robust setup for integrating nextjs and nestjs within an nx monorepo using pnpm package manager

I am considering building my application with Next.js for the frontend and NestJS for the backend, all within an NX monorepo using the Pnpm workspace. I'm uncertain about how to structure the folders for this project. Should I opt for a package-based repo ...

Nx repository encountering module resolution issue

Hey there (and happy new year!), Recently, I utilized a template for a monorepo provided by our organization to migrate an Angular project into the monorepo. Before running npm i, I made sure to add all necessary dependencies. However, after restarting VS ...

Leveraging NestJs Libraries within Your Nx Monorepo Main Application

I am currently part of a collaborative Nx monorepo workspace. The setup of the workspace looks something like this: https://i.stack.imgur.com/zenPw.png Within the structure, the api functions as a NestJS application while the data-access-scripts-execute ...

Is it possible to import a package from a monorepo located in a different repository?

Currently, I have successfully set up a create-react-app and a storybook packages in a lerna monorepo. My goal now is to utilize the components created within the storybook package in an entirely fresh repository. I attempted using npm install git://githu ...

What are the best steps to follow when creating a new package within a lerna monorepo?

I have recently come into possession of a monorepo that contains a packages folder housing all the current packages. My goal is to include a new main package that is essential for my existing panel package, which is currently at version 0.34.0. Since I fre ...

Having trouble compiling a Vue.js application with TypeScript project references?

I'm exploring the implementation of Typescript project references to develop a Vue application within a monorepo. The current structure of my projects is outlined below: client/ package.json tsconfig.json src/ ... server/ package.json t ...

Utilizing shared components across a Next.js application within a monorepo

Utilizing a monorepo to share types, DTOs, and other isomorphic app components from backend services (Nest.js) within the same mono repo has presented some challenges for me. In my setup, both the next.js app and nest.js app (which itself is a nest.js mono ...

A guide on using tsc to build a local package

Unique Project Structure I have a unique monorepo structure (utilizing npm workspaces) that includes a directory called api. This api directory houses an express API written in typescript. Additionally, the api folder relies on a local package called @mya ...

Tips for automatically refreshing a Next.js application following an update in an external library

I have a monorepo containing two applications: The first is a Next.js web app The second is a UI library using Tailwind CSS and Microbundle Currently, the only way I can get the web app to recognize changes made in the UI library is by following these st ...

Issue with Turbopack Monorepo: next/font/google is causing an error

I decided to dive into the world of TurboRepo with an example project. My first step was running the following command: npx create-turbo@latest -e with-tailwind This created two apps, a web and doc app. The web app itself is a complete Next.js app. Withi ...

Setting up a Lerna monorepo with TypeScript: A Comprehensive Guide

I have a central repository with the following details in config.json: "main": "dist/cjs/index.js", "module": "dist/esm/index.js", "es2015": "dist/es2015/index.js", "types": "dist/es2015/index.d.ts", "typings": "dist/es2015/index.d.ts", The repository co ...

Facing an "Invalid hook call" error in the NX monorepo with Next.js when trying to utilize jotai

Encountering a pesky "Invalid hook call" error while working on a Next.js app within an NX workspace. I've prepared this CodeSandbox. The start command fails when executed automatically, so manual rerun may be required. To replicate the issue, these step ...

Issue with StyleX defineVars not being applied in Next.js project (turboRepo)

I am currently working on a Next.js project with turboRepo and using StyleX for styling. I have run into an issue where the design tokens defined with stylex.defineVars are not being applied as expected. Here's a breakdown of my project structure and ...

Setting up a Vercel deployment for a NX Monorepo project with React and Express

https://github.com/clearhost-cmd/helloapp I am facing challenges in deploying my NX Monorepo to Vercel. While the NX Monorepo runs smoothly on localhost without any issues, I'm encountering difficulties getting it to work on Vercel. There are no e ...

Error encountered: "Missing fs module in Expo and NextJS build"

After setting up a monorepo for a NextJS + Expo React Native cross-platform application using Solito (), I successfully deployed both web and iOS apps. However, I encountered a build error in the Expo iOS app after accidentally wiping my local repository a ...

"Challenges with conditional exports and bundle size discrepancies arise when utilizing TurboRepo for a monorepo structure with a Next.js application and buildable

Trying to set up a JS/TS monorepo using Turborepo: . └── root ├── apps │ ├── first-app (next.js app) │ └── second-app (next.js app) ├── configs (ts, tsup) └── packages └── ui (re ...

The error message displayed by Turborepo indicates that npm is not installed

? Please select a package manager: npm (currently not installed) pnpm yarn (currently not installed) ? Which package manager would you like to use? npm pnpm yarn (currently not installed) ...

Determine the sum of exported identifiers based on ESLint rules

Currently, I am facing a requirement in my JavaScript/TypeScript monorepo to ensure that each library maintains a minimal amount of exported identifiers. Is there any existing eslint rule or package available that can keep track of the total number of exp ...

Utilize a monorepo structure with multiple versioning files for your yarn projects, troubleshoot any issues with yarn version

My NextJS monorepo app is in the following state: The monorepo contains multiple private packages managed through yarn workspaces develop serves as the default branch and testing environment with several commits ahead of main main branch has fewer commits ...

The library path in a react (js) integrated mono repo could not be resolved by Nx 16

Greetings everyone, I am a newcomer to the world of NX Monorepo. Following the step-by-step instructions on how to create an Integrated React Monorepo from the official NX website can be found here. I diligently followed each instruction provided. Howeve ...

Error encountered during deployment of Cloud Functions due to missing dependencies in monorepository

I am facing an issue with my monorepo setup where my cloud functions are importing from another package within the workspace. The imported package is listed in the package.json under devDependencies as shown below: // stuff "dependencies": { &q ...

The error message "Declaration file for module 'mime' not found" was issued when trying to pnpm firebase app

Currently, I am in the process of transitioning from yarn to pnpm within my turborepo monorepo setup. However, I have run into an issue while executing lint or build commands: ../../node_modules/.pnpm/@<a href="/cdn-cgi/l/email-protection" class="__cf_e ...

Is it acceptable to use "*" for the dependency version in NPM Workspaces / monorepo?

It appears to be functioning properly, { "dependencies": { "my-local-dep": "*" } } Instead of having fake 0.0.1 version numbers stamped in. Is this considered suitable or troublesome? When I execute >npm update, it does at ...

Share only the distribution folder of a local package in a monorepo using NPM Workspaces, instead of sharing the entire source files

Utilizing NPM Workspaces, I am sharing the package components with other projects such as webapp1 and webapp2. The structure is set up like this: root apps webapp1 webapp2 packages components Everything is functioning correctly, but all ...

Packaging npm modules involves including files from the root folder of a package within a monorepo

In my monorepo setup, I have a mix of private and public packages. There are some common files in the root folder that I want to include when I run npm pack. I tried creating symlinks and specifying '../../file' in the files attribute of the package.json, ...

The issue of resolving custom paths imports in Typescript has been a persistent challenge for developers

Currently, I am developing a project in PHP and utilizing Typescript. I aim to follow a monorepo pattern similar to what NX offers. However, I am facing challenges when attempting to compile typescript for each of my apps. Here is the current structure of ...

Utilize npm workspaces to refresh the package.json files nested within package-lock.json

I am utilizing npm workspaces to manage a monorepo. One thing I've noticed is that the top-level package-lock.json contains a cached version of each workspace's package.json in its "package" field. How can I update these cached versions without a ...

The environmental factors in Turbo are crucial for optimizing performance

I'm having trouble accessing an environmental variable from my local .env file in one of my turbo packages. Every time I try to use it, it returns as undefined. My project is using Turbo to manage a monorepo and is built with Next.js/React/Typescript. ...

Is there a way to enable live-reload for a local npm package within a monorepo setup?

Currently, I am in the process of setting up a monorepo workspace that will house a Vue 3 application (using vite and TypeScript), cloud functions, and a shared library containing functions and TypeScript interfaces. I have successfully imported my local ...

Design a unique <Link> component within my React shared UI library by utilizing a monorepo approach

As a newcomer to application architecture, I am eager to experiment with building an app using a Monorepo structure. I have a query regarding a Next.js frontend app that utilizes my React-based UI package shared across multiple apps within the same Monore ...

Are NPM 7 Workspaces the Solution to Managing Multiple node_modules?

I seem to be encountering a problem when using NPM 7 Workspaces for my app. I anticipated that running npm install from the root directory would generate a separate node_modules folder for each workspace, similar to how Lerna operates. However, after execu ...

Troubleshooting tips for resolving issues when launching Nx React + Express

[webpack-dev-server] [HPM] Encountered an issue while forwarding request localhost:4200/api to http://localhost:3333/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors) While setting up my nx app with react and express, I face ...

Issue: Module '@nrwl/workspace/src/utilities/perf-logging' not found

I attempted to run an Angular project using nxMonorepo and made sure to install all the necessary node modules. However, when I tried running the command "nx migrate --run-migrations" in my directory PS C:UsersDellDesktopMEANAPPEAAPP, I encountered ...