Currently, I am in the process of setting up a project that requires an angular client with a minimal node server on the backend using typescript.
Ideally, I envision a folder structure as follows:
/
/dist : Angular client (production) files
/server: Node.js files (generated by typescript)
/tests: Server-side test scripts
/src/client: Angular typescript
/src/server: Node typescript
/src/tests: Node typescript test scripts
/src/common: Shared files between node and angular (interface definitions, utilities, etc.)
The real challenge I am facing lies in creating individual `tsconfig.json` files for each folder. The errors I encounter relate to root issues and module not found errors.
A specific error I have been struggling with is:
"error TS6059: File 'common/interfaces/cell.ts' is not under 'rootDir' 'server/'. 'rootDir' is expected to contain all source files."
Is there a way to address this issue when building or compiling the server? Can we relocate the `common` folder underneath the server directory to resolve this problem?
This seems like a common requirement in projects like these, but if it isn't, what would be the best practice? Your guidance on configuring the correct settings in the respective `tsconfig.json` files would be greatly appreciated.