Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Extjs 在sencha touch应用程序中使用socket.io_Extjs_Socket.io_Sencha Touch_Sencha Touch 2 - Fatal编程技术网

Extjs 在sencha touch应用程序中使用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": "

我想在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": "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”的响应正常,您是否检查了开发工具的网络选项卡?