Node.js + Socket.io + Windows 7 / 8?

后端 未结 11 1818
迷失自我
迷失自我 2021-02-07 05:29

I\'ve been searching everywhere, but can\'t seem to find a solution. Is it possible to install Socket.io on Node.js on Windows 7?

If not, is there some sort of alternati

相关标签:
11条回答
  • 2021-02-07 06:01

    Create a file called package.json in your project directory with the following.

    {
         "name": "project name",
         "description": "project description,
         "version": "0.0.1",
         "dependencies": {
            "express": "2.4.6",
            "socket.io": "version"
         }
    }
    

    Then run the npm install

    0 讨论(0)
  • 2021-02-07 06:01

    For anyone who is having trouble getting Node.js and socket.io working on Windows...

    There is the nodejs-win project on Google Code.

    http://code.google.com/p/nodejs-win/downloads/detail?name=node_setup_0.5.6.7.exe&can=2&q=

    And here is a video that shows the basics of using it.

    Node.JS & Socket.IO Chat System in Windows

    0 讨论(0)
  • 2021-02-07 06:02

    I had the same problem with Node.js v10.22 on Windows 7 - this worked for me:

    npm install socket.io@0.8.4
    
    0 讨论(0)
  • 2021-02-07 06:05

    Now that Node.js version 0.6.0 is available, and it seems pretty stable so far, I'm going to suggest using it if you're planning on developing on Windows.

    http://nodejs.org/download/

    0 讨论(0)
  • 2021-02-07 06:06

    Until NPM is built for Windows you'll need to download the packages manually and create the node_modules folder structure in the node.exe folder. Follow this post.

    0 讨论(0)
提交回复
热议问题