Skip to content
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

Integrate other frameworks with Express.js - not detecting server.js #7614

Open
dzak83 opened this issue Aug 30, 2024 · 0 comments
Open

Integrate other frameworks with Express.js - not detecting server.js #7614

dzak83 opened this issue Aug 30, 2024 · 0 comments

Comments

@dzak83
Copy link

dzak83 commented Aug 30, 2024

[REQUIRED] Environment info

firebase-tools: 13.4.1

Platform: Windows

[REQUIRED] Test case

I am deploying Vite React SSR solution for Firebase Express.js but it's not detecting server.js

[REQUIRED] Steps to reproduce

  1. Clone Vite React SSR example: https://github.com/bluwy/create-vite-extra/tree/master/template-ssr-react
  2. Run locally and confirm it works with vite
  3. Follow firebase setup as per https://firebase.google.com/docs/hosting/frameworks/express, so:
  4. Make sure source is set to
    "hosting": { "source": "." }
  5. Add in package.json
    "directories": { "serve": "dist" },
  6. firebase deploy

[REQUIRED] Expected behavior

server.js is running and is replacing html parts

[REQUIRED] Actual behavior

server.js is not running

I tried many configuration options but I don't think express is running at all. If I navigate manually to https://{myapp}.web.app/client the index.html from client react will render react page but without server rendering so I know that hosting is up and fine for client.
When I navigate to https://{myapp}.web.app/server/entry-server.js I also see the file.

I also tried adding to package.json:
"files": ["dist", "server.js"], "main": "server.js",
but it didn't resolve the problem.

This feature is so new that I have issues to find any other tutorial online and after trying many configurations I think it might be broken.

Let me know if I can provide better logs to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants