#outDir in @medusajs/admin-bundler/dist/index.js is missing /dist

1 messages · Page 1 of 1 (latest)

coral escarp
#

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.

fluid flower
#

I cant find this code 🤔

coral escarp
#

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"

fluid flower
#

but the admin is built and outputed in .medusa/server/public/admin so I am not sure where this dist is comming from

coral escarp
#

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

fluid flower
#

yes there is a release not for every RC

fluid flower
#

can you share the project repo please?

coral escarp
#

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.