[Bug] failed to run server tests in node 20 #5317
-
📦 部署环境Other 📌 软件版本main 💻 系统环境Ubuntu 🌐 浏览器Chrome 🐛 问题描述failed to run server tests in
if i replace code line 7 with following code, it works and no error message appears.
📷 复现步骤
🚦 期望结果No TypeError in setup-db.ts 📝 补充信息No response |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
@xiaotia3 你好! 我是 Dosu,我是一个可以帮助你解决 bug,回答问题,并成为贡献者的机器人。我会在等待人类维护者的过程中帮助你。 The issue you're encountering is due to changes in Node.js v20, where certain global properties, like The workaround you found, using Object.defineProperty(global, 'crypto', {
value: new Crypto(),
writable: true,
}); This approach is effective because it uses To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
The issue you're encountering with the By using To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
comment |
Beta Was this translation helpful? Give feedback.
comment
global.crypto = new Crypto();
and then rerun