Setting up simple monorepo with 'shared' folder

Hi folks, thanks in advance for any help. I'm trying to set up a monorepo structure in which I have three components, each stored within their own folder: - 'backend' - 'frontend' - 'shared' the 'shared' folder should be accessible from within both the frontend and backend. If possible, I'd like the shared folder to also be able to import from the backend (so that we can re-export to the frontend) My current configuration can be found here: https://github.com/FlynnHillier/flayva.git Currently I am having various (seemingly inconsistent) issues accessing types exported from the shared folder, I am also having trouble building each part of the project due to the shared folder. If anyone is more knowledgable than me with tsconfig jargon (I know very little about tsconfig, most of my configuration comes from recommendations from AI) or can reference me to a project they / someone they know has successfully implemented with a similar structure, that would be very helpful. Thanks again.
GitHub
GitHub - FlynnHillier/flayva: A food-focused social media web app t...
A food-focused social media web app that blends the engaging social aspects of traditional social media with the in-depth content typically found in food blogs. - FlynnHillier/flayva
1 Reply
kal
kalOP7d ago
this branch is more updated: https://github.com/FlynnHillier/flayva/tree/create-post I've just made a commit in which I change a few things which seems to have fixed all of my typescript typing access issues, however I still seem to have issues attempting to build the project. Specifically, during build, the backend does not seem to be able to resolve the 'User' type declared in our shared folder. And the frontend (vite) states that a circular reference exists (see image)
No description

Did you find this page helpful?