socket.io - ReferenceError: io is not defined

后端 未结 8 1581
再見小時候
再見小時候 2020-12-02 13:11

I am writing an application for Android 2.3.5 (that will also be compatible with iOS). I wish to transfer data from the app\'s HTML/Javascript to a Python program on a serve

8条回答
  •  长情又很酷
    2020-12-02 13:56

    This looks like your browser cannot find the socket.io.js file. You could try opening the index.html on your computer with Firefox+Firebug or the Chrome Web Developer Tools and look at how the .js file is requested. On the other side, you could check the logs on the webserver serving the .js file whether there are any file not found errors.

    The require function would be provided by e.g. RequireJS, but you would still need to configure the paths to your scripts correctly for it to work.

提交回复
热议问题