You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
register Error
at <anonymous> (/Users/bugyaluwang/Desktop/my-projects/RSSHub/lib/utils/ofetch.ts:6:25)
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
at async loadESM (node:internal/process/esm_loader:34:7)
at async handleMainPromise (node:internal/modules/run_main:106:12)
register Error
at logger (/Users/bugyaluwang/Desktop/my-projects/RSSHub/lib/utils/ofetch.ts:6:25)
at Object.<anonymous> (/Users/bugyaluwang/Desktop/my-projects/RSSHub/lib/utils/ofetch.ts:35:16)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Object.transformer (/Users/bugyaluwang/Desktop/my-projects/RSSHub/node_modules/.pnpm/[email protected]/node_modules/tsx/dist/register-DpmFHar1.cjs:2:1186)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at ofetch (/Users/bugyaluwang/Desktop/my-projects/RSSHub/lib/utils/got.ts:2:20)
at Object.<anonymous> (/Users/bugyaluwang/Desktop/my-projects/RSSHub/lib/utils/got.ts:86:27)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Object.transformer (/Users/bugyaluwang/Desktop/my-projects/RSSHub/node_modules/.pnpm/[email protected]/node_modules/tsx/dist/register-DpmFHar1.cjs:2:1186)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
路由地址
完整路由地址
相关文档
Any
预期是什么?
我尝试在
lib/utils/ofetch
这个文件中添加了有副作用的代码用于启动 devtools,但是 devtools 不断报错。经过 debugger,我添加了这一部分代码:
尝试发现,是因为存在循环引用导致的函数副作用被二次触发。对应的位置应该在这里:
我想询问一下这部分代码能否被移动到其他地方以解决循环引用问题。因为我理解中,这或许会导致 ofetch 文件导出的 rofetch 出现无法预知的行为。
实际发生了什么?
即便使用了动态导入,实际上并没有解决循环引用导致的 ofetch.ts 存在的副作用隐患。可能导致导出的
rofetch
对象存在未知行为。部署
RSSHub 演示 (https://rsshub.app)
部署相关信息
No response
额外信息
这不是重复的 issue
The text was updated successfully, but these errors were encountered: