微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

我尝试使用 pm2 启动我的 APP,但它没有启动,而是无限重启

如何解决我尝试使用 pm2 启动我的 APP,但它没有启动,而是无限重启

npm start 可以很好地启动我的应用程序,但是当我这样做时:

pm2 start server.js

我明白了:

[PM2] Applying action restartProcessId on app [Huxbot](ids: [ 0 ])
[PM2] [Huxbot](0) ✓
[PM2] Process successfully started

App Image

在我得到的日志中:

PM2        | 2021-04-19T01:33:15: PM2 log: App [Huxbot] exited with code [1] via signal [SIGINT]
PM2        | 2021-04-19T01:33:15: PM2 log: App [Huxbot:0] starting in -fork mode-
PM2        | 2021-04-19T01:33:15: PM2 log: App [Huxbot:0] online
PM2        | 2021-04-19T01:33:23: PM2 log: App [Huxbot:0] exited with code [1] via signal [SIGINT]
PM2        | 2021-04-19T01:33:23: PM2 log: App [Huxbot:0] starting in -fork mode-
PM2        | 2021-04-19T01:33:23: PM2 log: App [Huxbot:0] online
PM2        | 2021-04-19T01:33:31: PM2 log: App [Huxbot:0] exited with code [1] via signal [SIGINT]
PM2        | 2021-04-19T01:33:31: PM2 log: App [Huxbot:0] starting in -fork mode-
PM2        | 2021-04-19T01:33:31: PM2 log: App [Huxbot:0] online
PM2        | 2021-04-19T01:33:39: PM2 log: App [Huxbot:0] exited with code [1] via signal [SIGINT]
PM2        | 2021-04-19T01:33:39: PM2 log: App [Huxbot:0] starting in -fork mode-
PM2        | 2021-04-19T01:33:39: PM2 log: App [Huxbot:0] online
PM2        | 2021-04-19T01:33:46: PM2 log: App [Huxbot:0] exited with code [1] via signal [SIGINT]
PM2        | 2021-04-19T01:33:46: PM2 log: App [Huxbot:0] starting in -fork mode-
PM2        | 2021-04-19T01:33:46: PM2 log: App [Huxbot:0] online

这是我的 package.json:

{
"name": "Huxbot","version": "3.5.0","description": "Huxbot","main": "server.js","scripts": {
"start": "node server.js"
},"dependencies": {
"@tohru/gm": "^1.3.0","canvas": "^2.6.1","canvas-constructor": "^3.2.0","cheerio": "^0.22.0","discord-youtube-api": "^0.1.0","discord.js": "^11.5.1","express": "^4.17.1","fortnite": "^4.3.2","fs": "^0.0.2","google": "^2.1.0","google-searcher": "^1.0.0","google-translate": "^3.0.0","google-translate-api": "^2.3.0","hive-api": "^1.13.10","idiotic-api": "^0.2.11","jimp": "^0.12.0","js-robloxapi": "^1.0.6","kiz": "^1.0.1","mal-scraper": "^2.6.9","marsnpm": "^0.4.5","mega-dtbs": "^0.1.17","megadb": "^3.4.0","moment": "^2.26.0","nekos.life": "^2.0.7","node-fetch": "^2.6.0","node-opus": "^0.3.3","node-osu": "^2.2.0","opusscript": "^0.0.7","querystring": "^0.2.0","request": "^2.88.2","retrotext": "^4.0.1","simple-youtube-api": "^5.2.1","snekfetch": "^4.0.4","sqlite": "^4.0.7","sqlite3": "^4.2.0","superagent": "^5.2.2","weather-js": "^2.0.0","weeb-sh": "^0.3.3","weez": "^1.6.0","yandex-translate": "^2.1.3","ytdl-core": "^2.1.4","ms": "^2.1.2","quick.db": "^7.1.1","morgan": "^1.10.0","path": "^0.12.7","ejs": "^3.1.3","passport-discord": "^0.1.3","passport": "^0.4.1","body-parser": "^1.19.0","express-session": "^1.17.1","twilio": "^4.6.0","http": "^0.0.0","merge-descriptors": "^1.0.1","node-superfetch": "^0.1.10","common-tags": "^1.8.0","request-promise-native": "^1.0.8"
},"engines": {
"node": "10.x"
},"repository": {
"url": "https://glitch.com/edit/#!/hello-sqlite"
},"license": "MIT","keywords": [
"node","glitch","express"
]
}

我目前拥有最新版本的 node 和 pm2,这在一夜之间发生在我身上,以前从未发生在我身上 值得一提的是,这是一个不和谐的机器人项目,我是在VPS上托管的。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。