#app.use() requires a middleware function

4 messages · Page 1 of 1 (latest)

fervent walrus
#

⠙ Initializing plugins
warn: An error occured while registering endpoints in your Medusa project
warn: TypeError: app.use() requires a middleware function

This warning just popped-up after upgrading to 1.12.2. I couldn't find anyone else reported this so decided to ask what did I miss? the backend works even with the warning. Anything to pay attention to?

Thanks

mint gulch
#

To narrow things down, the approach I would take if I were you is to disable all plugins and then re-enable one by one to figure out the culprit and then go from there.

fervent walrus
#

Thanks @mint gulch I disabled all plugins but the error still appears. Would be thankful for any other ideas. Thanks

mint gulch
#

Hmm. Do you have any custom API routes? Maybe try deleting that src/api folder for now. If that doesn’t work, it could be that your project files are corrupted. Maybe a bad download. You could try deleting node_modules and reinstalling.