medusajs / b2b-starter-medusa

Official Medusa B2B Starter template. Features common B2B ecommerce requirements and can be easily adapted and extended.
https://dub.sh/medusa-b2b-starter
MIT License
140 stars 37 forks source link

No docs about deployment #97

Open mk0y opened 4 days ago

mk0y commented 4 days ago

Hi!

I'm struggling to deploy this project. Locally it's all fine and easy, but deploying is not straightforward, according to the docs + turbo monorepo aren't really in sync.

I'm following here https://docs.medusajs.com/learn/build how to build, but

cd .medusa/server && yarn install

Throws error:

Usage Error: The nearest package directory (/.../my-project/apps/backend/.medusa/server) doesn't seem to be part of the project declared in /.../my-project.

I even create yarn.lock file in it using custom script in package.json (root):

    "backend-install": "cd apps/backend && yarn install && cd .medusa/server && touch yarn.lock && yarn install",

But then I'm getting:

➤ YN0000: · Yarn 4.5.0
➤ YN0000: ┌ Resolution step
➤ YN0001: │ Error: @starter/types@workspace:^: Workspace not found (@starter/types@workspace:^)

Thing is if I want to deploy it, i can't use both ports :8000 and :9000 at same time.

Any ideas?

EDIT: i managed to solve it, i think, not sure if that's the correct way:

  1. Copied medusa-config.js to .medusa/server
  2. Removed line "@starter/types": "workspace:^", in backend in package.json
  3. Added .env.production to .medusa/server
shubhamchoudhary-2003 commented 4 days ago

hi sir can i get your discord or number to talk i have problem starting it