All Questions
76
questions
20
votes
0
answers
5k
views
Typescript pnpm monorepo, path aliases conflicts between local dependencies during build
I have a PNPM with TurbeRepo monorepo, used this template. In this monorepo I have a NextJS app that uses a ui-shared package (local shared code, not actually an npm package).
The ui-shared is made in ...
17
votes
3
answers
20k
views
what the different between `pnpm install` and `pnpm add`?
I am work on monorepo stuff, and found that some guys use pnpm install to install packages in workspace, but some other use pnpm add.
in the pnpm docs, its seem like the same between add and install ...
11
votes
1
answer
6k
views
pnpm in monorepo - how to run a command only in a specific package?
Let's say I want to install a package in a specific package in my monorepo, how do I do this from root?
in npm, you can do this with something like this:
npm install react --workspace=a
I searched ...
11
votes
1
answer
5k
views
pnpm -- sync versions of dependencies
Let's say I have the following stricture for a Javascript monorepo
-- module a
package.json
-- module b
package.json
package.json
Module A and Module B both depend on lodash.
With pnpm, is ...
8
votes
2
answers
1k
views
Mismatching React types in pnpm monorepo
i'm trying to convert an inherited monorepo from yarn+lerna to pnpm workspaces
i'm currently getting an error due to mismatching react versions, typescript isn't picking up on the @types/react version ...
8
votes
2
answers
3k
views
pnpm & vue & vite monorepo - resolve import of alias path inside a workspace package
I'm building a monorepo of UI applications using shared components and style using pnpm, typescript, vue, and vite.
While trying to leverage pnpm's workspace ecosystem to ease the development ...
7
votes
1
answer
2k
views
Turborepo set order of execution for dev pipeline
I have following scenario:
/apps
/api
/web
/packages
/shared
api and web have a dependency on shared. They are both installed with workspace: * using pnpm.
My turbo.json looks like this:
{...
6
votes
1
answer
10k
views
`pnpm add` within a workspace does not add projects from workspace
I am working with a very simple monorepo with the following structure:
.npmrc
package.json
pnpm-workspaces.yml
packages/
package-1/
package-2/
When I cd into package-1, I am trying to add a ...
5
votes
6
answers
7k
views
React native monorepo with PNPM
My goal
I am trying to use React native monorepo with PNPM, because I need performance of pnpm.
Expected
I should be able to bundle React native app with pnpm android and start development server with ...
5
votes
1
answer
2k
views
Publish NPM package that uses a workspaces as dependencies
so I have a project that I'm working on that is a Monorepo. So I have a packages directory in the root directory that contains all my npm packages. Some of these packages rely on eachother e.g. in a ...
5
votes
1
answer
5k
views
How to fix the error: "No Next.js version could be detected in your project." when deploying to Vercel with Turborepo and pnpm
I am trying to deploy the Turborepo example app to Vercel using instructions from here, and getting the error:
Error: No Next.js version could be detected in your project. Make sure `"next"` ...
4
votes
1
answer
16k
views
I'm getting a weird (ERRCODE 243) error when installing a 3rd party js package using Rush.js by running `rush add --package <package>`
my team is migrating to rush and I had a problem while setting it up: I'm getting a weird error when trying to add any 3rd party lib (let's say react) to package.json using rush add --package react (...
4
votes
1
answer
6k
views
PNPM monorepo deployment with docker compose
I currently have a monorepo which has the following structure:
.
├── services/
│ └── api/
│ ├── src/
│ │ └── ...
│ └── Dockerfile
├── apps/
│ └── frontend
├── packages/
│ └── ...
3
votes
1
answer
949
views
How to use a global .env file at root with SvelteKit and Turborepo?
Is there a way to share a .env.local env variables file through my entire Turborepo app? So far it is not recognized through my SvelteKit website
I've seen around that I could use dotenv-cli in the ...
3
votes
1
answer
1k
views
How to trigger packages to build automatically when using pnpm install?
Our project use pnpm + workspace + typescript follow the monorepo standard. After clone the repository, we run pnpm install to install dependencies and link local packages to each other. But the code ...
3
votes
0
answers
584
views
Failure to install node modules within react native app in a mono repo using pnpm
i'm attempting to run a react native app in a monorepo using pnpm. I added it to pnpm-workspace.yaml file defined as:
packages:
- "apps/*"
When i attempt to run npm i or pnpm i i kept ...
3
votes
0
answers
1k
views
How to use local-only dependencies in PNPM workspace
I have a general PNPM question regarding Monorepos. Let me describe a simplified problem statement:
Monorepo contains two packages: [email protected] and [email protected]
The foo package is a library which is ...
2
votes
1
answer
2k
views
How do I deploy an app in a monorepo (Turborepo), with local dependencies, as a Google Cloud Function?
I'm moving a project to a monorepo (Turborepo w/pnpm) and having trouble deploying my Google Cloud Functions. Normally I would simply use the gcloud CLI. For example:
call pnpm run build && ...
2
votes
1
answer
6k
views
How to add an internal package for types with Turborepo?
I've been trying to create an internal package for my Monorepo based on Turborepo. I am running Nuxt 3 with Tailwind. Now my Issue is that I am trying to create a custom package for types. I tried ...
2
votes
2
answers
958
views
How to import local monorepo typescript package in Angular apps?
I'm trying to integrate an Angular project into a PNPM workspace monorepo that mainly contains react app. Here is the directory structure
|-apps
| |-react-app
| | |-package.json
| |
| |-angular-...
2
votes
1
answer
2k
views
How can I run PNPM workspace projects as parallel jobs on GitHub Actions?
Given a repository structure with two packages like this:
$ tree
.
└── packages
├── foo
└── bar
$ cat pnpm-workspace.yaml
packages:
- 'packages/**'
$ pnpm -s m ls --depth -1
monorepo /...
2
votes
1
answer
1k
views
Deploying monorepo projects to AWS Lambda with dependencies
I have set up a Node.js (Typescript) based Monorepo, and I am using Turborepo as the tool to manage the Monorepo. I am using pnpm as my package manager.
All my main projects are present in the apps ...
2
votes
1
answer
532
views
stop pnpm from creating symlink for a package
we are in the process of migrating from yarn2.xx to pnpm (8.6.2) within our monorepo.
However one of our packages which is used in 3 different services. @prisma/client. generates a bunch of types ...
2
votes
0
answers
485
views
Dockerize a Typescript MERN monorepo that uses pnpm workspaces
I have a project with the following folder structure, it's a typescript monorepo that has two apps (client and api) and a shared library (shared), both the backend and the frontend depend on the ...
2
votes
1
answer
1k
views
How to deploy an application from a monorepo with a shared library?
I'm trying to deploy an app that is on a monorepo that imports a library that is inside this same repo, I'm using pnpm as packager manager
pnpm-workspace.yaml
packages:
- "packages/common/ui&...
2
votes
1
answer
956
views
Why my package is not correctly exported in node_modules after build in pnpm monorepo
First of all, let me apologize if I make so many mistakes in this posts, since I don't really understand how dependencies work and how monorepos are handled (I am trying :P ).
I am currently using a ...
2
votes
1
answer
499
views
How to build for docker (rush monorepo)?
So I have a monorepo using rush (pnpm).
I have multiple applications and multiple libraries. Applications depend on libraries, and libraries depend on libraries.
I know pnpm creates a node_modules ...
2
votes
0
answers
2k
views
pnpm monorepo resolve nested dependencies
I have a monorepo using pnpm and svelte, the structure of the repo is like the following
.
├── packages
│ └── app1/
| └──package.json { "devDependencies": { "components":&...
1
vote
1
answer
1k
views
How to run pnpm on a nested folder that is _not_ part of workspace setup?
How can I run pnpm on a nested package that is not supposed to be part of a workspace inside a monorepo? Say I have
root
├── packages
│ ├── foo
│ └── bar
├── non-workspaced-packages
│ └── baz
├...
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 ...
1
vote
1
answer
2k
views
Rollup Error in pnpm-workspace monorepo:'default' is not exported by ../../node_modules/.pnpm/[email protected]/node_modules/classnames/index.js
I have a UI lib repo , which could working well with below rollup config
My rollup.conf.js
import babel from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import json from '@...
1
vote
1
answer
247
views
PNPM Workspaces - how to activate some "hot reload" when changing packages?
I'm facing a bit of a challenge to configure a monorepo with pnpm workspaces.
Saying I have the following structure:
apps
- application1
- application2
packages
- @my-project/package1
- @my-...
1
vote
1
answer
190
views
pnpm firebase app "Could not find a declaration file for module 'mime'"
I'm trying to switch from yarn to pnpm in my turborepo monorepo.
When running lint or build I get this error:
../../node_modules/.pnpm/@[email protected]/node_modules/@types/serve-static/index....
1
vote
0
answers
235
views
How can I configure Vitest to be able to run tests from a package folder in a monorepo?
I'm using Vitest in my monorepo (pnpm workspaces + tsc composite projects) and when I want to execute a test from the root directory it works:
npx vitest run -t "My test name"
but as soon ...
1
vote
0
answers
20
views
browser still in loading state after adding a lib for my components nx monorepo
Current Behavior
browser still in loading state after adding a lib for my components im using nx monorepo with react and vite
Expected Behavior
the app to be loaded and shown the ui in browser
Steps ...
1
vote
0
answers
60
views
Multiple customers forking off same monorepo
I have 5 (soon to be more) clients. For each of them I am developing 1-2 custom apps. Each of these apps requires a react front-end, and functions backend (cloudflare workers). And the apps for a ...
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’" ...
1
vote
0
answers
133
views
Why doesn't ts-node resolve ts-config as a symlink correctly
I have recently setup a TurboRepo project using PNPM,
however I'm having difficulties getting ts-node to pick up a shared tsconfig.
TSError: ⨯ Unable to compile TypeScript:
error TS6053: File '@Repo/...
1
vote
1
answer
1k
views
PNPM build and publish TypeScript monorepo
I have a TypeScript monorepo with PNPM. There are two projects in packages: app and lib.
app depends on lib with PNPM workspace feature. The package.json file of app looks like below, as well as the ...
1
vote
0
answers
138
views
How to prevent class duplication in a mono repo that uses tailwindcss for UI and frontend both?
I have a pnpm mono repo project with two packages: ui and frontend. I use the same config (copy/paste) for both packages. When I build the project, the ui package is built first, and its classes are ...
1
vote
0
answers
545
views
How to replace workspace:^ with workspace:* in pnpm?
I am using pnpm to manage packages. When I add a workspace dependency using pnpm add shared-configs --workspace --filter package-b, pnpm generates this in package-b's package.json file:
"...
1
vote
0
answers
224
views
Can I use lambda with monorepo and use the internal packages with pnpm?
I have a monorepo that looks like so:
monorepo
├── Dockerfile
├── README.md
├── apps
│ ├── lambda-app-1
│ ├── index.js
├── node_modules
├── package.json
├── packages
│ ├── package-1
├── pnpm-...
1
vote
0
answers
267
views
How to count all npm packages used in the monorepo project?
The current project is an older monorepo project, which uses yarn to manage dependency packages, and many subprojects use phantom dependencies. At present, the project is gradually migrating to pnpm, ...
1
vote
0
answers
213
views
tsc tries to compile everything in my monorepo rather than just one package
I am at my wits end with what I imagine is a trivial problem, but multiple devs at my company have been flummoxed by this for some time.
We are mid-migration to a monorepo which will include our ...
1
vote
0
answers
492
views
How do I use Sanity Studio v3 in a PnPM monorepo?
I am testing out Sanity Studio v3 for the first time. In the past (v2), I was able to get Sanity and my frontend (Sveltekit or Next) set up in a simple PNPM monorepo so I only need to run one command ...
1
vote
0
answers
211
views
Monorepos, Typescript, Transitive dependencies, and package managers (pnpm)
So I just bootstrapped a monorepo using rush (pnpm).
I have a library called web-commons that has dependencies "
fastify, and others.
I have a backend application called my-app.
I want to use ...
1
vote
0
answers
286
views
in pnpm monorepo condition,someone workspace pakcage being dependend on mutiple workspace package in the way of workspace
for example:
1.packageB depended on packageA by workspace
2.add packageC and packgeC also depended on packgeA by workspace
3.when develop packageC, i modify the packageA
4.now, packageB was influenced,...
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
1
answer
1k
views
"<PackageA> is in the dependencies but no package named <PackageA> is present in the workspace" - Error when running pnpm install
I have multiple packages in a monorepo setup with pnpm 8.14.1 and Lerna 7.3.0. I'm running the command pnpm install and getting the error:
ERR_PNPM_WORKSPACE_PKG_NOT_FOUND In packages\<PackageB>...
0
votes
1
answer
891
views
Monorepo - lock app to stay on specific package version
I have a monorepo, that contains packages, and apps that are using those packages.
I am using pnpm workspaces on all apps with workspace:*
Now I've updated on of the packages with breaking changes, ...