Troubleshooting Build Error after running npm run build getting blank white screen
ฝัง
- เผยแพร่เมื่อ 4 ธ.ค. 2024
- In this video, I address a common error I encountered while trying to open my app using the build feature. I demonstrate the issue and explain how to fix it by modifying the package.json file. By following my instructions, you will be able to successfully run the build and host your app correctly.
#react
#react js
#javascript errors
#subscribe
Thanks bro I can,t solve through other method over 5 hours but you give the right solution
Thanks Buddy
You bro literally solved the error, i was trying it for whole day 😢❤❤❤ thank you so much
Thanks brooo...It works . Literally I was finding the solution for almost a week
Thanks a lot man. I finally found a tutorial that really helps. Good Job !
Bro, i clone my project from github to vscode and when i run the project by npm start , it show blank page (localhost:3000). But when i runs same project on other port (localhost:3001) it runs. Is my problem same to your problem???? I also clone other repositories but they works fine.
100% working thanks bro ❤
not working in my system
but bro how to deploy in github
Thank you so much for this video, It worked for me.
very ice tutorial fixed my issue thankyou brother, may god bless you......😍😘
Thank you bro
mycase still not working, " npm start " working
npm run build " White blank Screen "
Same
are you using VITE ?
yes, I'm using VITE. still not working@@ossigen8_Shorts-Video
@@ossigen8_Shorts-Videousing vite it shows blank screen , any solution
we same. Now, have you found the answer yet?@@zetxs4l
thanks bro. Really helped me
code with harry hena brother keep learning bro..
he s a guru
i am using vue3 with vite, while build it getting same issue and implement this solution in there. but it did not work,Can you give a solution for that ?
Put this code inside of your `vite.config.js` in `export default defineConfig({})`:
base: './',
// Re-run `npm run build` on your terminal, and this will be fixed. Now you can publish this.
Thanks bro Working fine now
Thank you brother 💕💕😊
What about vite users?
did you get the solution
Put this code inside of your `vite.config.js` in `export default defineConfig({})`:
base: './',
// Re-run `npm run build` on your terminal, and this will be fixed. Now you can publish this.
Hi devs. If you're using react.js, put this code inside of your `vite.config.js` in `export default defineConfig({})`:
base: './',
/*
Re-run `npm run build` on your terminal, and this will be fixed. Now you can publish this.
`Daljeet Singh`, can you pin my comment? I think that it will help these users that yet having this problem.
*/
hi i have updated my vite config file i am still facing the same issue
Thanks a lot brother. It worked❤
Sir image not showing what have to do
thanks bhai
How to get *Open with Live Server* option ?
it's an extension, you can get it from the extensions tab in VS Code
thanks bro
nahi hua bhai i tried for still same issue
But routing is not working pls help
Remove browserrouter with HashRouter and also import it
bro it worked
thank you, but whey not work with me i use vite
can you tell me what hapen ? are you solve this probleme?
@@talebkhaddour3927
Deploy project to github pages and you use react routing using "BrowserRouter" You will definitely get this error when you reload the page
There is no solution that I have not tried.
The only solution that worked was to use "HashRouter" and base:"/repoName/" in vite.config
Deploy the same project to vercel using "BrowserRouter" with base: "./" added in vite.config.js and don't forget to add vercel.json file, it will work fine.
@@talebkhaddour3927 Deploy project to github pages and you use react routing using "BrowserRouter" You will definitely get this error when you reload the page
There is no solution that I have not tried.
The only solution that worked was to use "HashRouter" and base:"/repoName/" in vite.config
Deploy the same project to vercel using "BrowserRouter" with base: "./" added in vite.config.js and don't forget to add vercel.json file, it will work fine.
Not solve
i have changed the path but still getting this error in staging platform.but production is not going in chunk.
#15 42.51 344.87 KB build/static/js/2.fc43a14a.chunk.js
#15 42.51 13.49 KB build/static/js/main.5bcf156c.chunk.js
#15 42.51 3.41 KB build/static/css/main.ba53bf18.chunk.css
#15 42.51 2.22 KB build/static/css/2.af4a3662.chunk.css
#15 42.51 796 B build/static/js/runtime-main.ed72fef9.js
it is staging deployment logs🥲
i am deploying my website in firebase here the build folder created but inside it no staic folder created and getting this errorstatic/css/main.8f6e867d.css from Css Minimizer plugin
Error: Unexpected '/'. Escaping special characters with \ may help.plss help me out