#getting a white screen after deploying my vite project on vercel
25 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
getting a white screen after deploying my project please help
Did you check vercels logs?
these were the build logs Running build in Washington, D.C., USA (East) – iad1
Retrieving list of deployment files...
Downloading 216 deployment files...
Restored build cache
Running "vercel build"
Vercel CLI 34.2.7
WARN! Due to builds existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings
Installing dependencies...
npm WARN reify invalid or damaged lockfile detected
npm WARN reify please re-try this operation once it completes
npm WARN reify so that the damage can be corrected, or perform
npm WARN reify a fresh install with no lockfile if the problem persists.
npm WARN reify invalid or damaged lockfile detected
And do you get something in the server logs? I would expect to see an error in the logs when you visit the page
do you have a vercel.json in your project?
seems like all requests are returning the base html
yes i have ``` {
"builds": [
{
"src": "package.json",
"use": "@vercel/static-build",
"config": {
"distDir": "dist"
}
}
],
"routes": [
{
"src": "/(.*)",
"dest": "/index.html"
}
]
}
uhh are you not using nextjs?
doesn't vercel deploy other than next js
yes it can though this is a nextjs server, not a vercel server...
anyway it looks like you don't need a vercel.json, though. a typical vite app can simply be pushed to github and deployment to vercel will just work https://vitejs.dev/guide/static-deploy.html#vercel-for-git
that vercel.json currently configures that all requests are routed to index.html. hence your stylesheet and script requests are routed to index.html too
should i delete the vercel.json file
yes
what happens internally if vercel json file is removed
vercel.json holds the configuration that you use to tell vercel how to deploy. here you don't need it, but in advanced use cases you might
still nothing happened after deleting that json file
have you redeployed?
nvm looks like you did redeploy. then i cant help here, sorry – i don't use vite. hope someone else will be able to help
(though this is a nextjs server, not a vercel server. you probably will have more luck asking in the reactiflux server or a vite server if it exists)