a month ago
Hello,
I have medusa js, for months there was no issues. Now on deplyment step it fails with:
Error starting server
Could not find index.html in the admin build directory. Make sure to run 'medusa build' before starting the server.
Were there any changes at railway that could how builds run with docker?
2 Replies
a month ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open Railway • about 1 month ago
a month ago
Fixed by change of build command from:
"build": "medusa build && ln -s .medusa/server/public/ public"
to:
"build": "medusa build && node -e \"const fs=require('fs');const path=require('path');const src=path.join('.medusa','server','public');const dest='public';const adminSrc=path.join('.medusa','server','public','admin');const adminDest=path.join('.medusa','admin');if(fs.existsSync(dest)){fs.rmSync(dest,{recursive:true,force:true});}try{fs.symlinkSync(src,dest,'junction');}catch(e){fs.cpSync(src,dest,{recursive:true});}if(fs.existsSync(adminSrc)){if(fs.existsSync(adminDest)){fs.rmSync(adminDest,{recursive:true,force:true});}fs.cpSync(adminSrc,adminDest,{recursive:true});}\"",
Why that was required is yet to be established. Previous config worked for 5 months. Suddenly it did not. I am investigating dependencies.
a month ago
Railway has deprecated Nixpacks in favor of their new Railpack builder. According to their recent announcement from March 2025:
New services default to Railpack automatically
Existing services continue with Nixpacks but it's in maintenance mode
This change could be affecting how your builds execute