Turborepo Fastify cant import files from shared package
I have setup a monorepo with Turborepo to store code for a
frontend
and a backend
application.
I've followed the Shared Monorepo guide from railway where I biuld my application from the root of the monorepo and then run pnpm build:sever
and pnpm start:server
to build and start the server.
But when the Fastify backend starts running after build, I get the following error:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '/app/apps/fastify/node_modules/@acme/db/' imported from /app/apps/fastify/dist/index.js
Are there any examples of setting up a backend application in Railway using Turborepo? My setups is based of this repo: https://github.com/The-Zagy/zagy-blogGitHub
GitHub - The-Zagy/zagy-blog: The-Zagy Blog
The-Zagy Blog. Contribute to The-Zagy/zagy-blog development by creating an account on GitHub.
2 Replies