I have a problem with “npx medusa start” in my MedusaJS 2.x rc project. The path of “outDir” in @medusajs/admin-bundler/dist/index.js seems not correct. The build puts the files in “/app/dist/public/admin”, during the start process “/dist” is missing in the path of “outDir”. The path there is “/app/public/admin”. The server can then not be started.
#outDir in @medusajs/admin-bundler/dist/index.js is missing /dist
1 messages · Page 1 of 1 (latest)
I cant find this code 🤔
the marked line is my (should not been used) quick fix to make it work
or do you mean the whole code?
node_modules/@medusajs/admin-bundler/dist/index.js
line 1333 ff.
there is a const htmlPath that holds the path to the index.html of "admin"
but the admin is built and outputed in .medusa/server/public/admin so I am not sure where this dist is comming from
I have updated from the preview version - maybe I missed something there?
Is there a update guide or someth?
I run
npx medusa build
npx medusa start
yes there is a release not for every RC
you can look the rc 5 release note here https://github.com/medusajs/medusa/releases/tag/v2.0.0-rc.5
can you share the project repo please?
I have now been able to find the cause of the problem myself. The outDir is defined in the file “tsconfig.json”. I was not aware of this. In the version with which I started the 2.x preview, the “outDir” was set to “./dist”. It might be good to mention in the upgrade information that the “tsconfig.json” may need to be adjusted.