I'm trying to add imports from another shared project in my monorepo into my Nest.js project.
Whenever I add either a path alias or a relative import it changed the structure of the build directory from dist/src/main.js to
dist/
├─ nest-project/
│ └─ src/
│ └─ main.js
├─ shared-project/
│ └─ src/
| └─ index.js
└─ src/
├─ main.js
└─ app.controller.ts
This causes the following error when trying to run nest start
Error: Cannot find module '/Users/.../monorepo/nest-project/dist/main'
Has anyone got an idea on how the main file can be correctly found? With all my other projects this happens automatically.