-
node v16.20.1 Error: Cannot find module '/root/Miuzarte/cq-picsearcher-bot/index.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
at Function.Module._load (node:internal/modules/cjs/loader:873:27)
at Object.<anonymous> (/root/Miuzarte/cq-picsearcher-bot/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
} 然后把旧的src和index拉过来 Error: Cannot find module 'esm'
Require stack:
- /root/Miuzarte/cq-picsearcher-bot/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
at Module.Hook._require.Module.require (/root/Miuzarte/cq-picsearcher-bot/node_modules/require-in-the-middle/index.js:81:25)
at require (node:internal/modules/cjs/helpers:108:18)
at Object.<anonymous> (/root/Miuzarte/cq-picsearcher-bot/index.js:35:11)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at Object.<anonymous> (/root/Miuzarte/cq-picsearcher-bot/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
at Module._compile (node:internal/modules/cjs/loader:1198:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/root/Miuzarte/cq-picsearcher-bot/index.js' ]
} |
Beta Was this translation helpful? Give feedback.
Answered by
Tsuk1ko
Jul 1, 2023
Replies: 1 comment 2 replies
-
哦,你是不是pm2一直没kill掉重新起? 3.x 开始切换到 esm 了,入口文件变了,是 mjs 不是 js,pm2 需要 kill 掉重新启动,当初更新日志里写了的 用最新的代码不要旧的代码,npm run kill 然后再 npm start |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Tsuk1ko
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
哦,你是不是pm2一直没kill掉重新起?
3.x 开始切换到 esm 了,入口文件变了,是 mjs 不是 js,pm2 需要 kill 掉重新启动,当初更新日志里写了的
用最新的代码不要旧的代码,npm run kill 然后再 npm start