Closed turacma closed 2 weeks ago
Not knowing the code base intimately, it seems like this might be the issue:
https://github.com/medusajs/medusa/blob/develop/packages/medusa/src/loaders/admin.ts#L42
If I understand this correctly, any outdir
set by the user will be ignored.
Hi @turacma, are you following the guide on how to run the standalone build that Medusa outputs in V2? You can find it here: https://docs.medusajs.com/resources/medusa-cli/commands/build#run-built-medusa-application
In V2 the medusa build
command will create a standalone app in your outDir. To run the build you have to do the following:
medusa start
Following these steps should ensure that the application starts correctly, and that the admin loader is able to locate the admin build.
@kasperkristensen Got it, thanks. This didn't seem to be necessary with the preview when we were setting this up, so wasn't expecting this to change.
Bug report
Describe the bug
When certain configuration options are used (
workerMode
) or when NODE_ENV is set tostaging
orproduction
, server start up is checking the wrong folder. I've tried settingoutdir
in my medusa config, but this doesn't seem to change the behavior.System information
Medusa version (including plugins): Node.js version: 20.15.0 Database: Postgres Operating system: Mac OS Browser (if relevant): N/A
Steps to reproduce the behavior
workerMode: "shared"
toprojectConfig
index.html
is missingExpected behavior
Changing parameters shouldn't change the path, or it should be configurable in a way that makes sense. Additionally, the error message should be updated to reflect the path that is being checked.
Screenshots
N/A
Code snippets
N/A
Additional context