medusajs / medusa

Building blocks for digital commerce
https://medusajs.com
MIT License
23.72k stars 2.28k forks source link

Medusa is not working with turborepos #5544

Open Xxsource98 opened 8 months ago

Xxsource98 commented 8 months ago

Bug report

Describe the bug

Hi, I am working on a turborepo project where I would like to use medusa with nextjs and some custom packages. First problem is that I can not start medusa app with turbo run dev. Possible fix is disable hoisting in package.json for yarn workspaces for modules like @medusajs/admin, @medusajs/medusa... Okay it got fixed, but when I want to use custom package with my custom payment processor from package/ directory medusa isn't reading services from that. Subscribers works fine but I can not use my custom services like fulfillment service or payment processor. But when I put my custom package in node_modules in medusa project directory then it works fine. It seems like linking not working. Is medusa even "supported" by turborepos? Is there any ways to fix it?

System information

Medusa version (including plugins): 1.17.2 Node.js version: 18.71.1 Database: postgres Operating system: Ubuntu 22.04 Browser (if relevant): Brave

Screenshots

image

vholik commented 7 months ago

I solved this problem when using yarn workspaces monorepository. yarn add @medusajs/medusa solved this problem