Node.js says it can't load sqlite3 module, but does anyway

前端 未结 7 1621
遥遥无期
遥遥无期 2021-01-31 09:23

I\'m working with the new Node.js Tools for Visual Studio and included the sqlite3 npm module. When I call require(\'sqlite3\') it throws the error:

相关标签:
7条回答
  • 2021-01-31 10:16

    From: https://github.com/mapbox/node-sqlite3/wiki/Building-On-Windows

    1. Install required software:
      1. Python 2.x: https://www.python.org/downloads/release/python-2711/
      2. Win SDK: http://www.microsoft.com/en-us/download/details.aspx?displayLang=en&id=8279
      3. Microsoft Visual Studio 2010+: http://go.microsoft.com/?linkid=9816758
    2. Build:
      1. npm install sqlite
      2. npm install
      3. node-gyp configure build
    0 讨论(0)
提交回复
热议问题