在 Heroku 上部署 Vite React 应用程序时遇到问题

发布于 2025-01-12 10:35:06 字数 219 浏览 3 评论 0原文

我的应用程序有问题。我已成功将所有文件推送到网站上,但我发现它正在使用 npm start 启动我的应用程序。我需要它来使用“npm run dev”。 heroku 日志--尾部

I'm having problem with my app. I've successfully pushed all the files onto the site, but I've discovered that it's starting my app with npm start. I need it to use 'npm run dev' instead.
heroku logs --tail

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ゝ偶尔ゞ 2025-01-19 10:35:06

最简单的方法是创建一个启动脚本并将要在生产中运行的命令放入其中。

如果您想要相同的命令,请将“dev”脚本的代码放在“start”脚本中,

因为“dev”脚本包含开发命令,而“start”应包含生产脚本。

Easiest way is to create a start script and put the command you want to run in production.

If you want the same command, put the 'dev' script's code in 'start' script

As 'dev' script contains command for development and 'start' should contain production script.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文