Hi everybody 👋👋
Current behavior
I am currently using Nest.js in a turborepo monorepo as the backend to my mobile app and the web app. In order to be able to share zod schemas and their inferred types across all of them, I created an internal Just-in-Time package named @repo/types
I get the following errors when trying to import anything from @repo/types:
Cannot find module '@repo/ui' or its corresponding type declarations. (when hovering over the package in VSCode in apps/api/src/app.service.ts)
This one when trying to start the backend server using nest start:
src/util/relations/link-single.ts:1:36 - error TS2307: Cannot find module '@repo/types' or its corresponding type declarations.
There are types at 'E:/Work/Freelance/Coding/Academi.fy/workspace/node_modules/@repo/types/src/index.ts', but this result could not be resolved under your current **'moduleResolution' setting**. Consider updating to **'node16', 'nodenext', or 'bundler'.**
1 import type { ZodLinkMethod } from '@repo/types';
The error messages indicate mismatched module and moduleResolution types. So I tried to set every module and moduleResolution type to NodeNext. After that I am getting the following error: