英文:
How to deploy and host vite-ssr-react-app?
问题
我刚刚创建了我的第一个 vite-ssr-reac-app,并试图将其发布到网络上,但我找不到免费托管的地方。我已经尝试过 netlify 和 firebase,但似乎不起作用。您有关于在哪里托管应用程序的任何建议吗?
我尝试了 netlify 和 firebase,但都没有成功。在 netlify 上,我得到了"Page Not Found"的错误,firebase 也是同样的情况。
英文:
I have just created my first vite-ssr-reac-app and im trying to publish it to the web, but i cant find where to host it for free.. I have tried netlify and firebase but it does not seem to work. Do you have any tips to where to host the app?
I tried netlify and firebase, but it did not work. In netlify i got "Page Not Found", and the same for firebase.
答案1
得分: 0
检查您的构建设置和命令:在 Netlify 或 Firebase 的项目设置中,您应该指定构建命令(对于 Vite 项目为 vite build)和发布目录(对于 Vite 项目为 dist)。看起来您已经意识到了这一点,但值得再次检查。当发布目录设置不正确时,通常会发生“找不到页面”的错误。
英文:
Check your build settings and commands: In your project settings in Netlify or Firebase, you should specify the build command (vite build for a Vite project) and the publish directory (dist in a Vite project). It seems you're already aware of this, but it's worth double-checking. The "Page Not Found" error often occurs when the publish directory is incorrectly set.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论