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

VERCEL Deployment: Impossible to deploy vercel when using "VITE" #1931

Closed
justminenguyen opened this issue Apr 1, 2024 · 6 comments
Closed

Comments

@justminenguyen
Copy link

What is the location of your example repository?

Hydrogen Demo Store

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

2024.1.4

What version of Remix are you using?

2.8.0

Steps to Reproduce

Try to deploy the Hydrogen demo store to Vercel

Expected Behavior

Deploy the hydrogen demo store when using vite.

Actual Behavior

I got these issue:
image

With Vercel cli:
image

It's worked fine when run build and preview in local with minioxygen runtime.

@frandiox
Copy link
Contributor

frandiox commented Apr 1, 2024

The server build is created by default in dist/server/index.js. Perhaps you need to tell Vercel where to find it?
You can also modify this in vite.config.js, in the remix(...) plugin.

Also, if you're not going to deploy to Oxygen, you probably can build the project using Remix CLI or Vite directly instead of Hydrogen CLI.

@quentinlagache
Copy link

Vercel is now providing support for Remix with Vite with a preset.

Screenshot 2024-05-15 at 14 47 53

@frandiox I'm also trying to deploy to Vercel but I don't see any option to set the entry point for server. Do you know any ressource that can help us to deploy to Vercel ?

Screenshot 2024-05-15 at 15 37 07

Also do you have a working example for the vite.config.js part ?

@frandiox
Copy link
Contributor

Unfortunately, I'm not familiar with it. It seems they don't recommend adding a custom entry point: https://vercel.com/docs/frameworks/remix#using-a-custom-server-file

I'm not sure what's the way they have to use getLoadContext otherwise.
cc @TooTallNate do you know what's the "recommended" way of adding things to the Remix context that works when deployed to Vercel?

@francosabolo
Copy link

Hello is there any update on this ? @frandiox @quentinlagache @justminenguyen

Thanks!

@Nichtkunst
Copy link

Is there any repository we can refer to if we want deploy the latest hydrogen to vercel?
The vercelPreset() is not working.

@Nichtkunst
Copy link

Vercel is now providing support for Remix with Vite with a preset.
Screenshot 2024-05-15 at 14 47 53

@frandiox I'm also trying to deploy to Vercel but I don't see any option to set the entry point for server. Do you know any ressource that can help us to deploy to Vercel ?
Screenshot 2024-05-15 at 15 37 07

Also do you have a working example for the vite.config.js part ?

any ressource, or repository we can refer to? @frandiox

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

No branches or pull requests

5 participants