medusa: Error starting server TypeError: (0 , modules_sdk_1.registerModules) is not a function

Bug report

Error starting Medusa Backend, error response is TypeError: (0 , modules_sdk_1.registerModules) is not a function

Describe the bug

Not sure what happened but when I tried to open Medusa server on my local, I kept on getting this error specified. Earlier, I was able to run the service with no problems. I just noticed the problem when I deployed it on our production layer and then suddenly it also happened to my local (after refreshing the packages). A clear and concise description of what the bug is. Cannot start Medusa Server medusa start or medusa develop due to the error stated below

System information

MacOS

Medusa version (including plugins):

{
  "dependencies": {
    "@medusajs/admin": "7.1.2",
    "@medusajs/cache-inmemory": "^1.8.8",
    "@medusajs/cache-redis": "^1.8.8",
    "@medusajs/event-bus-local": "^1.9.6",
    "@medusajs/event-bus-redis": "^1.8.9",
    "@medusajs/file-local": "^1.0.1",
    "@medusajs/medusa": "1.17.0",
    "@medusajs/medusa-js": "6.0.4",
    "@medusajs/ui": "2.0.0",
    "medusa-core-utils": "^1.2.0",
    "medusa-file-s3": "^1.3.1",
    "medusa-fulfillment-manual": "^1.1.38",
    "medusa-interfaces": "^1.3.7",
    "medusa-payment-manual": "^1.0.24",
    "medusa-payment-stripe": "^6.0.3",
    "medusa-payment-stripe-paynow": "^1.0.0",
    "medusa-plugin-algolia": "^0.2.20",
    "medusa-plugin-variant-images": "^1.0.4",
    "medusa-react": "^9.0.4"
  },
  "devDependencies": {
    "babel-preset-medusa-package": "^1.1.13"
  }
}

Node.js version:

18.17.1

Database:

PostgresQL

Operating system:

MacOS

Steps to reproduce the behavior

  1. Just simply run medusa start or medusa develop

Expected behavior

You should see this error: Screenshot 2023-11-10 at 10 46 20 PM

EDIT: I followed the solution from this issue https://github.com/medusajs/medusa/issues/5606#issue-1987845158 and it worked on my end.

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 19 (2 by maintainers)

Most upvoted comments

@olivermrbl Updating to "@medusajs/medusa": "1.17.4" worked! I’ve also removed the resolutions in the package.json and it still runs fine.

@stanley-tarce, can I get you to try with the latest version of @medusajs/medusa?

it doesn’t happen when using ‘npx create-medusa-app@latest’

only when using yarn

just tested twice