I am currently working on a Typescript extension for VS Code that utilizes the sqlite3 library.
My project.json file looks like this:
"dependencies": {
"sqlite3": "^4.0.2"
},
"devDependencies": {
"@types/mocha": "^2.2.42",
"@types/node": "^7.0.43",
"@types/sqlite3": "^3.1.3",
"tslint": "^5.8.0",
"typescript": "^2.6.1",
"vscode": "^1.1.6"
}
After installing the dependency, Typescript can successfully import sqlite3 (intellisense works fine), however, when running the extension, I encounter the following error:
Error: Cannot find module 'C:\projekty\MyFirstCodeExt\sqlite-starter\node_modules\sqlite3\lib\binding\node-v54-win32-x64\node_sqlite3.node'
I suspect it may be related to electron rebuild, but I'm not sure how to proceed with fixing it.
UPDATE: I verified the path:
\node_modules\sqlite3\lib\binding\node-v54-win32-x64\node_sqlite3.node'
However, I found the following instead:
\node_modules\sqlite3\lib\binding\node-v59-win32-x64\node_sqlite3.node'
I'm unsure of how to resolve this issue.