Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new medusajs project fails | PaymentModuleService #8125

Closed
HadiSDev opened this issue Jul 14, 2024 · 5 comments
Closed

Create new medusajs project fails | PaymentModuleService #8125

HadiSDev opened this issue Jul 14, 2024 · 5 comments

Comments

@HadiSDev
Copy link

Bug report

error: Could not resolve module: PaymentModuleService. Error: Loaders for module PaymentModuleService failed: column "is_enabled" of relation "payment_provider" does not exist

error: Error starting server
Error: Loaders for module PaymentModuleService failed: column "is_enabled" of relation "payment_provider" does not exist

Describe the bug

I get this error after having run the npx command to create a new project.

System information

Medusa version (including plugins): preview
Node.js version :v21.7.1
Database: postgres
Operating system: WSL
Browser (if relevant):

Steps to reproduce the behavior

  1. Create project: npx create-medusa-app@preview --db-url "postgres://root:root@162.19.134.321:32XXX/db-name"
  2. It should fail after migration but if not try npm run dev
@thetutlage
Copy link
Contributor

thetutlage commented Jul 15, 2024

Hey @HadiSDev Can you please share the screenshot of the complete error?

Also, are you trying to use an existing database when creating a new project?

@thetutlage thetutlage self-assigned this Jul 15, 2024
@HadiSDev
Copy link
Author

Hey @HadiSDev Can you please share the screenshot of the complete error?

Also, are you trying to use an existing database when creating a new project?

Yes that is correct. Should I try a clean one?

@HadiSDev
Copy link
Author

I tried I clean postgres database but I still get an error:

Error: Loaders for module PaymentModuleService failed: select "p0".* from "public"."payment_provider" as "p0" where "p0"."id" in ('pp_system_default') - relation "public.payment_provider" does not exist
    at runLoaders (xxx/node_modules/@medusajs/modules-sdk/src/loaders/utils/load-internal.ts:353:14)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async loadInternalModule (xxx/node_modules/@medusajs/modules-sdk/src/loaders/utils/load-internal.ts:137:17)
    at async loadModule xxx/node_modules/@medusajs/modules-sdk/src/loaders/module-loader.ts:88:10)
    at async moduleLoader xxx/node_modules/@medusajs/modules-sdk/src/loaders/module-loader.ts:21:32)
    at async Function.bootstrap xxx/node_modules/@medusajs/modules-sdk/src/medusa-module.ts:353:7)
    at asyncxxx/node_modules/@medusajs/modules-sdk/src/medusa-app.ts:120:23
    at async Promise.all (index 17)
    at async loadModules (xxx/node_modules/@medusajs/modules-sdk/src/medusa-app.ts:91:3)
    at async MedusaApp_ (xxx/node_modules/@medusajs/modules-sdk/src/medusa-app.ts:334:22)

@sradevski
Copy link
Member

@HadiSDev can you please ensure the migrations have been run? Please try following the preview docs step by step, and let me know if the issue persists.

@srindom
Copy link
Collaborator

srindom commented Jul 22, 2024

@HadiSDev - I will close this for now as we can not reproduce in latest preview version. If this continues to be an issue please reopen with the latest details.

@srindom srindom closed this as completed Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants