Giter VIP home page Giter VIP logo

Comments (19)

shahednasser avatar shahednasser commented on September 12, 2024 1

@intrinsic-blockchain can you try to download this file and use it as yarn.lock in your project, re-install the dependencies, and try again?

https://res.cloudinary.com/dza7lstvk/raw/upload/v1721221052/OpenApi/yarn_ivml2e.lock

from medusa.

adrien2p avatar adrien2p commented on September 12, 2024 1

wonderful, cc @shahednasser

from medusa.

adrien2p avatar adrien2p commented on September 12, 2024

hey @intrinsic-blockchain could you share you packages preview versions please

from medusa.

intrinsic-blockchain avatar intrinsic-blockchain commented on September 12, 2024

@adrien2p thanks for checking. Here is what I have:
@medusajs/[email protected]
@medusajs/[email protected]

from medusa.

shahednasser avatar shahednasser commented on September 12, 2024

Hi @intrinsic-blockchain , can you try removing the node_modules and yarn.lock files and trying again? This could be due to an outdated preview version.

from medusa.

intrinsic-blockchain avatar intrinsic-blockchain commented on September 12, 2024

@shahednasser deleting the node_modules & yarn.lock did not help. The migrations run successfully only if I comment out the files src/links/vendor-admin.ts & src/links/vendor-order.ts
image
image
image

from medusa.

shahednasser avatar shahednasser commented on September 12, 2024

Is the issue with running or generating the migration? So if you run npx medusa migrations run do the links also cause an error?

from medusa.

intrinsic-blockchain avatar intrinsic-blockchain commented on September 12, 2024

Issue is with generating the migration with the command npx medusa migrations generate marketplaceModuleService. I think its unable to create the link between vendor & product models. Same with vendor-order models. It throws the Error: Key vendor_id is not linkable on service marketplaceModuleService error.

If its helpful this is what I have in vendor-product.ts in src/links folder,
image

hovering over MarketplaceModule.linkable.vendor shows this.
image

(property) vendor: {
id: {
serviceName: "marketplaceModuleService";
field: "vendor";
linkable: "vendor_id";
primaryKey: "id";
};
toJSON: () => {
serviceName: "marketplaceModuleService";
field: "vendor";
linkable: "vendor_id";
primaryKey: "id";
};
}

from medusa.

shahednasser avatar shahednasser commented on September 12, 2024

Ok but if you run npx medusa migrations run (with the link files) you see no errors right?

from medusa.

intrinsic-blockchain avatar intrinsic-blockchain commented on September 12, 2024

I see this error WITH the links files

image

from medusa.

adrien2p avatar adrien2p commented on September 12, 2024

@intrinsic-blockchain would you be able to provide us a minimal repository that reproduces this issue?

from medusa.

intrinsic-blockchain avatar intrinsic-blockchain commented on September 12, 2024

@adrien2p here it is: https://github.com/intrinsic-blockchain/medusa-preview

from medusa.

intrinsic-blockchain avatar intrinsic-blockchain commented on September 12, 2024

Unfortunately, using this yarn.lock file too didn't help. I still get the same error. I tried testing using yarn command as well as npm to install node modules, both the times see the same issue.

from medusa.

imash96 avatar imash96 commented on September 12, 2024

image
Getting same error while generating migrations

from medusa.

adrien2p avatar adrien2p commented on September 12, 2024

I think I know what is the issues, I am preparing a pr so that you can test as well #8194

from medusa.

adrien2p avatar adrien2p commented on September 12, 2024

Would you be able to test the snapshot generate here please

from medusa.

imash96 avatar imash96 commented on September 12, 2024

Yes issue is resolve thanks you very much @adrien2p

from medusa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.