首页 > 解决方案 > Socket.io 无法部署到 Heroku

问题描述

我正在尝试使用使用 socket.io 的 easyrtc 创建一个应用程序。它可以在 localhost 上运行,但是当我将其部署到 Heroku 时,出现以下错误:

Failed to load resource: the server responded with a status of 404 (Not Found) (index):1

Refused to execute script from 'https://deep-nodejs.herokuapp.com/socket.io/socket.io.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.(index):4

Uncaught ReferenceError: io is not defined (index):4

我怎样才能解决这个问题?对此问题的任何帮助表示赞赏。

标签: node.jsheroku

解决方案


推荐阅读