npm install for some packages (sqlite3, socket.io) fail with error MSB8020 on Windows 7

前端 未结 4 1987
野的像风
野的像风 2020-12-07 09:51

When trying to install some node.js packages (sqlite3 and socket.io in particular) using npm install socket.io on my Windows 7 machine with Visual Studio 2012 (

4条回答
  •  醉话见心
    2020-12-07 10:18

    To get around this on my machine I did this command to install the package:

    npm install socket.io --msvs_version=2012

    I found the answer here when having the problem with installing sqlite3 and it worked with socket.io as well.

    These might be more permanent solutions to fix the problem:

    1. Install Visual Studio 2010
    2. Updating the npm internal copy to a newer version of node-gyp as described here and here (probably the better option although I didn't get it working but didn't try for too long)

提交回复
热议问题