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

Express Vite template loads white screen in production mode #9275

Closed
numso opened this issue Apr 21, 2024 · 10 comments
Closed

Express Vite template loads white screen in production mode #9275

numso opened this issue Apr 21, 2024 · 10 comments

Comments

@numso
Copy link

numso commented Apr 21, 2024

Reproduction

  • npx create-remix@latest --template remix-run/remix/templates/express
  • npm run build
  • npm start

(note: npm run dev works fine. seems to be an issue with the production build)

System Info

System:
    OS: macOS 13.1
  Binaries:
    Node: 20.7.0 - ~/.nvm/versions/node/v20.7.0/bin/node
    npm: 10.1.0 - ~/.nvm/versions/node/v20.7.0/bin/npm
  Browsers:
    Arc: 1.39.0
  npmPackages:
    @remix-run/dev: ^2.8.1 => 2.8.1 
    @remix-run/express: ^2.8.1 => 2.8.1 
    @remix-run/node: ^2.8.1 => 2.8.1 
    @remix-run/react: ^2.8.1 => 2.8.1 
    vite: ^5.1.0 => 5.2.10

Used Package Manager

npm

Expected Behavior

I expected to see the default "Welcome to Remix" page.

Actual Behavior

The "Welcome to Remix" page flashes on the screen and then the screen goes completely blank. These errors are thrown in the console. I did this in a private window with no extensions.

image
@hugocbp
Copy link

hugocbp commented Apr 21, 2024

Same thing happens with the Cloudfare template https://test-remix-cloudfare-app.pages.dev/

A fresh no-template Remix install is also failing on Fly.io: https://remix-fly-io-test.fly.dev/.

Same steps to reproduce as the original report, but using the Cloudfare template in the first one and no template in the second one.

Also same thing that npm run dev works fine. Seems to be just something on the generated production build for the latest version.

@huijiewei
Copy link

override rollup to 4.15.0, this is rollup issue.

@hugocbp
Copy link

hugocbp commented Apr 22, 2024

override rollup to 4.15.0, this is rollup issue.

Thank you! That fixed it on both cases.

@changeyoucant
Copy link

changeyoucant commented Apr 22, 2024

override rollup to 4.15.0, this is rollup issue.
image
Hello, have a nice day ! I'm encountering the same issue. The page is displaying now, but the error persists. I'm not sure if I should ignore this error.and my rollup is 4.15.0

@AdiRishi
Copy link
Contributor

@changeyoucant are you sure you've set the override for rollup correctly? That error disappeared for me when I fixed rollup as mentioned above.
Add this to your package.json (assuming you're using pnpm)

"pnpm": {
    "overrides": {
      "rollup": "4.15.0"
    }
}

@brophdawg11
Copy link
Contributor

As folks have pointed out above, this is due to an issue in rollup@4.16 which is being investigated and should hopefully be fixed/reverted soon: rollup/rollup#5443

Also a duplicate of #9271

The proper workaround for now is to use rollup@4.15 either via direct install or by adding to the overrides section of your package.json.

@brophdawg11
Copy link
Contributor

brophdawg11 commented Apr 22, 2024

This should be resolved in rollup 4.16.2: https://github.com/rollup/rollup/releases/tag/v4.16.2

@brophdawg11 brophdawg11 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2024
@Cmoen11
Copy link

Cmoen11 commented Apr 23, 2024

This should be resolved in rollup 4.16.2: https://github.com/rollup/rollup/releases/tag/v4.16.2

Forgive me if I'm wrong.. But since this affects production builds, it should be announced some where? As for me, when i look up issues - i search for open issues - and this is now closed. So it might be hard for someone to figure out...

@brophdawg11
Copy link
Contributor

Why wouldn't this be closed if the issue is now fixed in rollup 4.16.2?

@Cmoen11
Copy link

Cmoen11 commented Apr 23, 2024

edit: never mind, just tested this and it is no issues in the template any longer... ;D

Why? Because when you pull down the template and try to deploy it you be left out not knowing why your pages aren't rendering...? And by logic you will look for issues that are currently open , not closed issues to try to figure out why...

It is not obvious for non contributors that it is rollup that is the issue

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

7 participants