medusajs / medusa

The world's most flexible commerce platform.
https://medusajs.com
MIT License
25.92k stars 2.6k forks source link

Can not install meilisearch plugin in v2.0.1 #9879

Closed kooliahmd closed 2 weeks ago

kooliahmd commented 2 weeks ago

On v2.0.1 It is not possible to install meilisearch with :

npm install medusa-plugin-meilisearch

I get:

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: medusa-starter-default@0.0.1
npm error Found: @medusajs/medusa@2.0.1
npm error node_modules/@medusajs/medusa
npm error   peerOptional @medusajs/medusa@"^2.0.0" from @medusajs/test-utils@2.0.1
npm error   node_modules/@medusajs/test-utils
npm error     dev @medusajs/test-utils@"latest" from the root project
npm error   @medusajs/medusa@"latest" from the root project
npm error
npm error Could not resolve dependency:
npm error medusa-plugin-meilisearch@"*" from the root project
npm error
npm error Conflicting peer dependency: @medusajs/medusa@1.20.10
npm error node_modules/@medusajs/medusa
npm error   peer @medusajs/medusa@"^1.12.0" from medusa-plugin-meilisearch@2.0.11
npm error   node_modules/medusa-plugin-meilisearch
npm error     medusa-plugin-meilisearch@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

When I try with

 npm install medusa-plugin-meilisearch --legacy-peer-deps

The install passes, However medusa backend server fails to start:

Error: Unable to find the plugin "medusa-plugin-meilisearch".
    at resolvePlugin (/Users/kooliahmed/projects/buyup/buyup/node_modules/@medusajs/medusa/src/loaders/helpers/resolve-plugins.ts:97:11)
    at /Users/kooliahmed/projects/buyup/buyup/node_modules/@medusajs/medusa/src/loaders/helpers/resolve-plugins.ts:137:21
    at Array.map (<anonymous>)
olivermrbl commented 2 weeks ago

The Meilisearch plugin has not been migrated to v2, and v1 plugins are not compatible with v2 you can't use it in its current state.

We don't have any plans of migrating the Meilisearch plugin ourselves any time soon, but you are more than welcome to take on this task when we release our updated plugin documentation soon.

IgorKhomenko commented 1 week ago

@olivermrbl is there any example of plugin which is already compatible with V2? Would be really helpful

chillpilllike commented 1 week ago

So currently we can not use any form of search on storefront?

kooliahmd commented 1 week ago

So currently we can not use any form of search on storefront?

Medusa 2.0 is still at its early stage, And most of the ecosystem around it is just not yet ready. Seems that the maintainers will rely on contributors to fill the gap. I would be happy to help however there is no guidance on how to upgrade a v1 plugin to v2. Also, should the medusa-plugin-meilisearch v2 live inside medusa mono-repo or create a new repo inside medusa orga, or the contributor have to fully take its ownership?

rokmohar commented 4 days ago

I had the same issue and I've created a plugin that works for me with Medusa 2.0.1

https://github.com/rokmohar/medusa-plugin-meilisearch