Closed TheTychoStar closed 4 months ago
问题描述: 一直正常运行,前天云崽自动更新后重启,之后后台模式(pnpm start)无法正常启动。而前台方式(node .)则可以正常运行。
尝试过的解决方法:
请问如何解决?
错误日志如下:
PM2 | App [TRSS-Yunzai:0] starting in -fork mode- PM2 | App [TRSS-Yunzai:0] online 0|TRSS-Yunzai | node:internal/modules/cjs/loader:1148 0|TRSS-Yunzai | throw err; 0|TRSS-Yunzai | ^ 0|TRSS-Yunzai | Error: Cannot find module '/home/ec2-user/trss/node_modules/.pnpm/pm2@5.4.0/node_modules/pm2/lib/ProcessContainerFork.js' 0|TRSS-Yunzai | at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15) 0|TRSS-Yunzai | at Module._load (node:internal/modules/cjs/loader:986:27) 0|TRSS-Yunzai | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12) 0|TRSS-Yunzai | at node:internal/main/run_main_module:28:49 { 0|TRSS-Yunzai | code: 'MODULE_NOT_FOUND', 0|TRSS-Yunzai | requireStack: [] 0|TRSS-Yunzai | } 0|TRSS-Yunzai | Node.js v20.13.1 PM2 | App [TRSS-Yunzai:0] exited with code [1] via signal [SIGINT] PM2 | App [TRSS-Yunzai:0] will restart in 15000ms
找到解决方法了,参考这里[Error: Cannot find module]
The reason is you pm2 env is modified, please try run command below to delete your pm2 env dir from your home dir. rm -rf ~/.pm2
rm -rf ~/.pm2
问题描述: 一直正常运行,前天云崽自动更新后重启,之后后台模式(pnpm start)无法正常启动。而前台方式(node .)则可以正常运行。
尝试过的解决方法:
请问如何解决?
错误日志如下: