#Trying to use new Pricing and Product features

36 messages · Page 1 of 1 (latest)

plain seal
#

Hello guys, I've been trying to get these new features added on my end to test them out but I don't manage to get it to work.
I've installed the new dependencies to my backend and the medusa_v2 featureFlag under my medusa-config.js file. I've tried to run the migrations restarting my service or running the migrations command manually but it always says there are not migrations to run.

Is there anything I'm missing?

lunar flax
#

Can you share your medusa config and package.json please

plain seal
plain seal
#

Hi, I realized I was missing to specify the modules in medusa config and now they are being loaded. I think the product module is working good but the pricing one is throwing me this error

lunar flax
#

Are you sure all your deps are correctly installed, looks like you are missing a feature flag

plain seal
#

These new features should be covered under the medusa_v2 flag right?

lunar flax
#

If you look at that migration you should see the feature flag used for it. But what i mean is that flag.key throw you this error cause flag seems to not be present for some reason . The flags are store in the medusa package

#

sorry, from the utils package

plain seal
#

I just tried to just have the product package and the migrations failed because the feature flag "medusa_v2" needs the pricing module as well. So I think it should be something else

lunar flax
#

so is your utils package up to date in your node modules?

#

key of undefined comes from there as I mentionned

plain seal
#

I did not have that package installed as a separated dependency, let me do some tests with it. I'll let you know in a few minutes

lunar flax
#

can you look what version of the utils package you have in the node modules under the medusa package. and if it contains the flag as expectd?

plain seal
#

I'm not facing the same issue anymore

#

Now it's complaining about my server not supporting SSL connections. Although I've never faced this issues with migrations before, I'm trying to see if it's anything on my end

lunar flax
#

in the medusa config database_extra you might need to add rejectUnauthorized: false, when you work locally

plain seal
#

It's weird, it doesn't matter if I set the rejectUnauthorized to false or true I'm getting this straight away

lunar flax
#

Have you setup something else for your db config?

plain seal
#

Hm, not really, I'm using the postgres proposed solution

lunar flax
#

in database_extra you have ssl: { rejectUnauthorized: false }

plain seal
#

It won't try to do migrations

lunar flax
#

you have it in the database_extra.ssl prop or just in database_extra

plain seal
#

inside the ssl prop

lunar flax
#

can you share you medusa config for the module please

plain seal
lunar flax
#

can you do

productService: {
      scope: "internal",
      resources: "shared",
      resolve: "@medusajs/product",
    },

for both modules

#

it shouldn't change i would be surprised but just in case

plain seal
#

same behavior with the ssl flag

#

let me try without it

lunar flax
#

this is very weird, cause medusa create a knex connection that is then shared to the module so it includes the same configuration across the modules and the core and the same co to the db

plain seal
#

I tried to make some others tests but I'm still stuck on the same spot 🥲

#

I'm going to create a new medusa project to see if that would work out

plain seal
#

It did work for a fresh application. Although, I had to set MEDUSA_POSTGRES_URL in .env file (I also did that on my existing project).

I wonder if I'm getting this connectivity issues because I have my database and project in different docker instances, not quite sure what can be going on here.

plain seal
#

I can confirm it was something with Docker, I cannot say what to be honest but I ran my medusa project from outside docker and managed to get it up and running with the migrations