Socket.io客户端.js文件未加载

时间:2021-09-24 15:50:23

I'm trying to deploy a socket.io chat in Heroku. The page loads, but the socket.io js file for the client is not getting downloaded, so the chat doesn't work.

我正在尝试在Heroku中部署socket.io聊天。页面加载,但客户端的socket.io js文件没有下载,因此聊天不起作用。

Here's images of the console in browser showing the error, the javascript portion of the page itself, and the config code of the server, in that order.

这是浏览器中控制台的图像,按顺序显示错误,页面本身的javascript部分和服务器的配置代码。

https://imgur.com/a/4YeZh

https://imgur.com/a/4YeZh

Am I doing something wrong? Thank you in advance

难道我做错了什么?先谢谢你

1 个解决方案

#1


0  

I think there is, a problem in referencing socket.io file, beacuse all of your js files, are references from js directory, but socket.io file is directly referenced.

我认为有一个问题,引用socket.io文件,因为你的所有js文件都是来自js目录的引用,但是直接引用了socket.io文件。

#1


0  

I think there is, a problem in referencing socket.io file, beacuse all of your js files, are references from js directory, but socket.io file is directly referenced.

我认为有一个问题,引用socket.io文件,因为你的所有js文件都是来自js目录的引用,但是直接引用了socket.io文件。