Closed tuxiaobei-scu closed 9 months ago
And which version are you using?
And which version are you using?
"@fails-components/webtransport": "^0.3.1", "socket.io": "^4.7.2"
I see 0.3.1...
I think I have seen this before on my code. I am not sure, but I do not know, if I only wrote a workaround in the app https://github.com/fails-components/avsrouter/commit/aa38677fa9db93c5e5d4f98e201e80c1d095fb92 or if it is already fixed in git (do not use the current development in Github, as I am restructuring much of the code in the moment). The problem is that the transport necessary for adding a path is only available after the server is started. So moving the code in the async after startServer should fix this. I try to remember the issue; if it is not already fixed, I will fix it after code restructuring.
我想我以前在我的代码上看到过这一点。我不确定,但我不知道,如果我只在应用程序中编写了解决方法 fails-components/avsrouter@aa38677 或者它是否已经在 git 中修复(不要使用 Github 中的当前开发,因为我目前正在重组大部分代码)。问题在于,添加路径所需的传输仅在服务器启动后才可用。因此,在 startServer 之后移动异步中的代码应该可以解决此问题。我试着记住这个问题;如果还没有修复,我会在代码重组后修复它。
Thanks! Moving the code after startServer
solved the issue.
I followed the instructions in the https://socket.io/get-started/webtransport documentation to set up the server. The final code matches exactly with the code provided in the article.
index.js
package.json
However, I am unable to run the code successfully.
I tried to run it on two separate servers with Node.js versions v18.19.0 and v20.10.0, but encountered issues on both. I appreciate any assistance. Thank you.