繁体   English   中英

Heroku 应用程序错误(nodemon:未找到)

[英]Heroku Application error ( nodemon: not found )

我的应用程序在本地运行良好,但是当我使用命令“git push heroku”时,出现应用程序错误。 我使用命令'heroku logs --tail',它显示错误信息如下。 我希望有人可以帮助我解决这个问题,非常感谢。

// 从我的终端:

2022-07-27T15:44:24.983651+00:00 app[web.1]: > nodemon --watch 
backend --exec babel-node backend/server.js
2022-07-27T15:44:24.983654+00:00 app[web.1]: 
2022-07-27T15:44:25.031291+00:00 app[web.1]: sh: 1: nodemon: 
not found
2022-07-27T15:44:25.310188+00:00 heroku[web.1]: Process exited 
with status 127
2022-07-27T15:44:25.401566+00:00 heroku[web.1]: State changed 
from starting to crashed
2022-07-27T15:44:47.638568+00:00 heroku[router]: at=error 
code=H10 desc="App crashed" method=GET path="/" host=my-amason- 
app.herokuapp.com request_id=c61d813e-1467-4474-8b4d- 
ad2ecc4141ad fwd="162.212.108.4" dyno= connect= service= 
status=503 bytes= protocol=https
2022-07-27T15:44:47.962345+00:00 heroku[router]: at=error 
code=H10 desc="App crashed" method=GET path="/favicon.ico" 
host=my-amason-app.herokuapp.com request_id=243e98ef-4b26-4a93- 
89f5-38515d30a4a4 fwd="162.212.108.4" dyno= connect= service= 
status=503 bytes= protocol=https
2022-07-27T16:09:50.250878+00:00 heroku[router]: at=error 
code=H10 desc="App crashed" method=GET path="/" host=my-amason- 
app.herokuapp.com request_id=56e35e15-10e9-4609-8af0- 
9d42d97bdde7 fwd="162.212.108.4" dyno= connect= service= 
status=503 bytes= protocol=https
2022-07-27T16:09:50.746665+00:00 heroku[router]: at=error 
code=H10 desc="App crashed" method=GET path="/favicon.ico" 
host=my-amason-app.herokuapp.com request_id=dfe6b501-c155-4e8a- 
8e8d-ad115771fd08 fwd="162.212.108.4" dyno= connect= service= 
status=503 bytes= protocol=https

//package.json:

{
 "dependencies": {
 "@babel/cli": "^7.18.6",
 "@babel/core": "^7.18.6",
 "@babel/node": "^7.18.6",
 "@babel/preset-env": "^7.18.6",
 "bcryptjs": "^2.4.3",
 "body-parser": "^1.19.0",
 "dotenv": "^16.0.1",
 "express": "^4.18.1",
 "express-async-handler": "^1.2.0",
 "jsonwebtoken": "^8.5.1",
 "mongoose": "^5.13.14",
 "multer": "^1.4.5-lts.1",
 "react-paypal-button-v2": "^2.6.3",
 "ts-node": "^10.9.1"
 },
"name": "amason",
"version": "1.0.0",
"type": "module",
"main": "index.js",
"devDependencies": {
"nodemon": "^2.0.18"
},
"engines": {
"node": "16.13.2",
"npm": "8.1.2"
 },
"scripts": {
"build": "cd frontend && npm install && npm run build",
"start": "nodemon --watch backend --exec babel-node 
          backend/server.js"
 },
 "author": "",
 "license": "ISC",
 "description": ""
 }

// 过程文件:

web:node --experimental-modules backend/server.js

对于开发使用 nodemon。 示例 => “开始”:“nodemon index.js”

用于生产使用节点。 示例 =>“开始”:“节点 index.js”。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM