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

前端 未结 7 1706
遥遥无期
遥遥无期 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 09:54

    In case this above has not worked for anyone, here is what worked for me:

    sudo apt install node-sqlite3
    

    (I am using Ubuntu with Vscode as editor). It seems installing this node-sqlite3 module was the one that was recognized.

提交回复
热议问题