React app does not show when deployed through moralis

when deploying my react app i still get the coming soon message eventhough it says it has been deployed

also it does not run from src without a copy of the index.html from public, when run from public it shows a blank page.

2 Likes

Thanks we will check

Have you built your react app or this is just source?
Moralis only supports built react apps

it is a built react app yes

Ok i forwarded to the team

While we wait for their answer the only thing I see spontaneously is that your terminal is in “src”

  • should it be in “public” perhaps if you want to upload the built version?

when i put the terminal in public, it will upload just a blank page. i used a different tool to verify it isn’t the react app itself that does not show as it will show when using surge on a production build.
i have also tried using moralis on the same production build and then it asks for index.html

also when using the public folder the .env file won’t work


most other tools seem to work from the parent folder in this case ‘ruilwinkel’ (would normally be the build folder ofcourse). maybe this is something that can be implemented for react apps? that it searches for the app in src and for index.html in public

/src/.. are your source files, and /public will contain the compiled build files (which is almost empty in your case). You need to compile the source to build files. If you use create-react-app, you need to run npm run build to do this

i did npm run build and it pushed everything into this folder


when i run the moralis deploy from there i get the same error message as in the second screenshot where it asks for index.html

MORE PICS


afbeelding

Yeah my bad, I meant the /build folder. That should be the correct folder, do not deploy from src or public. build has an index.html and all the files.

Did you do that? When I try to visit the page, it shows the results from public, (empty page without %PUBLIC_URL% being replaced etc.)

i deployed it once more from the build folder, i did another test from public hence why you saw that blank page https://2l8hm6ropitg.moralis.io/ it should work now as i rebuilt the entire app and redeployed it

however it still shows “coming soon”

Try clearing your cache, works perfectly from here :slight_smile:

the next issue would be that i can not automate it using github actions because the --d extension does not work but i made a different topic for that which is this one Moralis deploy --d doesn't seem to work

Ok great that it worked closing this thread :raised_hands: we continue in that other thread