如何部署和托管 vite-ssr-react-app?

huangapple go评论78阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年7月17日 21:53:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/76705151.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定