R
Railway14mo ago
fOfer

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-blog
GitHub
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
Percy
Percy14mo ago
Project ID: 2392a9e5-5d8e-488b-8904-1eb574bce78d
fOfer
fOfer14mo ago
2392a9e5-5d8e-488b-8904-1eb574bce78d I also see this error on the console:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @acme/fastify@0.1.0 start: `pnpm with-env node ./dist/index.js`
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @acme/fastify@0.1.0 start: `pnpm with-env node ./dist/index.js`
Want results from more Discord servers?
Add your server