-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Could not find index.html in the admin build directory. Make sure to run 'medusa build' before starting the server. #10147
Comments
I solved this issue by adding NODE_ENV to development like this
|
Hey @kanrio, can you confirm that your node env is development or production? |
@riqwan I have the same problem running medusa start inside docker with NODE_ENV set to |
Thanks @grgmgd, can you open a PR with the docker changes? I can take a look. |
@riqwan I tested it outside docker and the same problem happens. I just upgraded from the preview version to latest and I noticed the outDir changed to |
Let me try to reproduce, in the meantime can you share your tsconfig, package.json & medusa-config? @grgmgd |
Hi everyone, I’ve recently started exploring Medusa and wanted to try it out, but I’ve encountered an issue. After testing with version 2.0.4, I can confirm the same problem as others have reported. Here are the details: The issue only occurs when running with NODE_ENV=production.
Key observations:
Dependencies: { if anyone has resolved this or has insights into the root cause, I’d appreciate your guidance. |
I have the same problme, I just Drop " // NODE_ENV: 'production', for now.. I dont know how to solve it! |
updating your
|
@Saboor-Hakimi awesome! Yep, server start in production! Thanks! |
Package.json file
Node.js version
v20.16.0
Database and its version
15.7
Operating system name and version
MacOs, sonoma 14.5
Browser name
Chrome
What happended?
npm run seed or yarn seed after building with npm or yarn
error: Could not find index.html in the admin build directory. Make sure to run 'medusa build' before starting the server.
Error: Could not find index.html in the admin build directory. Make sure to run 'medusa build' before starting the server.
Expected behavior
Seeding database
Actual behavior
not seeding an error occurs
$ medusa exec ./src/scripts/seed.ts
info: Executing script at ./src/scripts/seed.ts...
info: Connection to Redis in module 'cache-redis' established
info: Connection to Redis in module 'event-bus-redis' established
info: Connection to Redis in module 'workflow-engine-redis' established
info: Connection to Redis PubSub in module 'workflow-engine-redis' established
info: Locking module: Using "in-memory" as default.
info: No job to load from /Users/x/Projects/xx/node_modules/@medusajs/medusa/dist/jobs. skipped.
error: Error running script
error: Could not find index.html in the admin build directory. Make sure to run 'medusa build' before starting the server.
Error: Could not find index.html in the admin build directory. Make sure to run 'medusa build' before starting the server.
at serve (/Users/x/Projects/xx/node_modules/@medusajs/admin-bundler/dist/index.js:1344:11)
at serveProductionBuild (/Users/x/Projects/xx/node_modules/@medusajs/medusa/src/loaders/admin.ts:75:28)
at async loadEntrypoints (/Users/x/Projects/xx/node_modules/@medusajs/medusa/src/loaders/index.ts:108:3)
at async exports.default (/Users/x/Projects/xx/node_modules/@medusajs/medusa/src/loaders/index.ts:164:31)
at async exec (/Users/x/Projects/xx/node_modules/@medusajs/medusa/src/commands/exec.ts:35:27)
error Command failed with exit code 1.
Link to reproduction repo
fresh install
The text was updated successfully, but these errors were encountered: