I have a pnpm monorepo I created with two apps and two packages. The apps cannot find a specific package in the workspace even thru it exists.
my pnpm-workspace.yaml file
packages:
- 'apps/staff-apps/*'
- 'apps/client-apps/*'
- 'packages/*'
my two packages in the packages dir:
- common
- firedb
The common package simple example package I setup from an example to see if it could detect the package build it and export a usable function. It works and can be imported.
The firedb package is a helper package for a firestore database.
My apps are in a staff-apps and client-apps one in each for now and are both create react-router apps.
The file at ./apps/staff-apps/semester-app/services/firestore.server.ts is trying to import a function from firedb. The import statement will autocomplete but I get a typescript error saying it does not exist even when I see the folder package with my own eyes.
The semester-app package.json has it there:
"dependencies": {
"@conform-to/react": "^1.2.2",
"@conform-to/zod": "^1.2.2",
"@food-mono/common": "workspace:*",
"@food-mono/firedb": "workspace:*",
"@radix-ui/react-dialog": "^1.1.4",
"@radix-ui/react-separator": "^1.1.1",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-tooltip": "^1.1.6",
"@react-router/node": "^7.1.2",
"@react-router/serve": "^7.1.2",
"class-variance-authority": "^0.7.1",
...
It works for the common package but not the firedb one.
The monorepo is completely open source and is my attempt to make apps for local food-pantries to use to help distribute food. I can't manage the family and staff apps separately anymore because they get out of sync too quickly so a monorepo is the only way I can continue to donate my time to helping with app development.
Here is the github link for where I am at now:
I made the branch stackover to lock this in one configuration for review. Any help would be appreciated.