Extjs 在sencha touch应用程序中使用socket.io
我想在sencha touch应用程序中使用socket.io 我在app.json js数组中添加了socket.io:Extjs 在sencha touch应用程序中使用socket.io,extjs,socket.io,sencha-touch,sencha-touch-2,Extjs,Socket.io,Sencha Touch,Sencha Touch 2,我想在sencha touch应用程序中使用socket.io 我在app.json js数组中添加了socket.io: "js": [ { "path": "touch/sencha-touch.js", "x-bootstrap": true }, { "path": "bootstrap.js", "x-bootstrap": true }, { "path": "
"js": [
{
"path": "touch/sencha-touch.js",
"x-bootstrap": true
},
{
"path": "bootstrap.js",
"x-bootstrap": true
},
{
"path": "lib/socket.io.js"
},
{
"path": "app.js",
"bundle": true, /* Indicates that all class dependencies are concatenated into this file when build */
"update": "delta"
}
下面是我要创建var套接字的地方:
var socket = io.connect('http://localhost:3000');
在浏览器中打开index.html时,出现以下错误:
ReferenceError: Can't find variable: io
如何修复我的应用程序?使用chrome开发工具检查浏览器,检查socket.io是否包含在html标题标记中,但仍然会出现错误:找不到模块“buffer”找不到变量:I如果对“get/lib/socket.io.js”的响应正常,您是否检查了开发工具的网络选项卡?