node.js - 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
我怎样才能解决这个问题?对此问题的任何帮助表示赞赏。
解决方案
推荐阅读
- c# - 如何将所有 linerenderer 测试功能放在游戏对象父级下?
- excel - Using TODAY() in YYYY-MM-DD format with Conditional Formatting in Excel
- python - Openpyxl - 将单元格范围(带公式)从工作簿复制到另一个
- c# - Visual Studio Windows 窗体设计器错误
- install4j - 支持动态安装程序参数?
- arrays - JOLT 根据键字段的存在过滤数组元素
- r - 是否可以在 R 中编写对用户输入请求的响应?
- javascript - 如何在 JavaScript 中计算屏幕纵横比?
- angularjs - AngularJS ngSubmitted 是错误的
- postgresql - 从数据库 postgres 运行 pentaho 作业