Closed chiubaca closed 12 months ago
I think related to https://github.com/medusajs/medusa/pull/1860 and https://github.com/medusajs/medusa/issues/1859
I'm facing a similar issue with my custom plugin. It appears that my endpoints are not registering.
I have tried with medusa new project
. Interestingly, none of the existing plugins (which register new endpoints) seems to work for me.
We have a pr that allows to pass a custom flag to node --preserve-symlinks
which will simplify the local development as it is mainly due to how you install and manage your local deps.
awesome, looking forward to this dropping
Even I am facing the same issue, is the PR merged?
Until this issue has been resolved, we will remove the note on peer deps from the documentation. We'll escalate its priority :)
Bug report
Describe the bug
custom plugin API endpoints dont work when using
peerDependancies
as recommended by the docs.If your package.json is setup like this, your custom endpoints are not picked up by Medusa server.
System information
Medusa version (including plugins): "^1.5.0" Node.js version: v16.13.0 Database: sqlite Operating system: mac os 12.4 Browser (if relevant): Arc Browser (Chromium based)
Steps to reproduce the behavior
Follow the Create a Plugin guide from start to end with a custom endpoint like in the How to Create Endpoint guide.
And set up your package.json as per the instructions in the Change Dependencies section.
When finally installing the plugin, the custom API endpoint does not work.
If you go back to your plugin package.json and update
"peerDependencies"
todependencies
, then reload the medusa server this resolves the problem.Expected behavior
The custom plugin should load the custom API endpoint as expected.
Add any other context about the problem here
yarn
CORE-983