【发布时间】:2021-10-29 16:23:17
【问题描述】:
更新:我已经了解了更多关于 Procfile 的角色以及 Heroku 将如何在没有 Procfile 存在的情况下使用“启动”脚本,但我在部署时仍然遇到同样的错误。
我正在尝试通过 Heroku 网站上的 GitHub 部署方法选项在 Heroku 上部署 MERN 应用程序。我知道 Heroku CLI 可能更好,但我现在尽量不要让自己的事情变得过于复杂,并且使用他们的 GitHub 选项也应该可以。这是我的构建日志:
-----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/nodejs
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 14.x...
Downloading and installing node 14.17.5...
Using default npm version: 6.14.14
-----> Restoring cache
- node_modules
-----> Installing dependencies
Installing node modules
added 83 packages in 2.675s
-----> Build
-----> Caching build
- node_modules
-----> Pruning devDependencies
audited 83 packages in 1.019s
4 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
-----> Build succeeded!
-----> Discovering process types
Default types for buildpack -> web
-----> Compressing...
Done: 35.6M
-----> Launching...
Released v7
https://react-node-database.herokuapp.com/ deployed to Heroku
我正在使用的 GitHub 存储库在这里:
https://github.com/phershbe/nodeandreactwithdatabase
我得到的页面显示“内部服务器错误”:
https://react-node-database.herokuapp.com/
该应用程序当然适用于我的本地主机。我已经尝试在此处以及 YouTube 和 Google 上搜索类似的问题,但显然没有找到我要搜索的内容。任何解决方案或建议将不胜感激。
【问题讨论】:
标签: javascript node.js reactjs heroku deployment