我拉去了别人的插件进行开发
使用–force忽略依赖问题,然后发现
类型“Context”上不存在属性“http”
但是
yarn dev
调试没有问题,直到我npm run build就报错了。
我不知道应该如何解决这个问题
比如仍然使用了import而不是require
loader Error [ERR_REQUIRE_ESM]: require() of ES Module /home/mqnu/program/koishi-app/external/phigros-redo/lib/index.js from /home/mqnu/program/koishi-app/node_modules/@koishijs/loader/lib/index.js not supported.
Instead change the require of /home/mqnu/program/koishi-app/external/phigros-redo/lib/index.js in /home/mqnu/program/koishi-app/node_modules/@koishijs/loader/lib/index.js to a dynamic import() which is available in all CommonJS modules.
at Proxy.import (/home/mqnu/program/koishi-app/node_modules/@koishijs/loader/lib/index.js:182:12)
at Proxy.resolve (/home/mqnu/program/koishi-app/node_modules/@koishijs/loader/lib/shared.js:267:51)
at Proxy.forkPlugin (/home/mqnu/program/koishi-app/node_modules/@koishijs/loader/lib/shared.js:287:31)
at Proxy.reload (/home/mqnu/program/koishi-app/node_modules/@koishijs/loader/lib/shared.js:319:27)
at Proxy.reload (/home/mqnu/program/koishi-app/node_modules/@koishijs/plugin-config/lib/shared/index.js:275:23)