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

前端 未结 7 1763
遥遥无期
遥遥无期 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:06

    I got the kind of problem, my node version is v10.16.3 This globally installed sqlite3 gives error in loading by require('sqlite3')

    It been solved by install a sqlite3 local to project.

    $ npm install sqlite3
    

    Note without -g option, it works for me.

提交回复
热议问题