What is the process for including the sqlite3 dependency in a VS Code extension?

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.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What are some solutions to the error message "Error: Cannot find any matching routes" that appears when trying to switch between tabs following a successful login?

I am facing an issue with my Ionic 4 (4.10.2 with Angular 7.3.1) app where I want to make it accessible only after login. Following a tutorial from , I encountered a problem when trying to access the ion-tabs section of my app. Chrome keeps showing this er ...

Context API is failing to work in components that use children when the version is v16.6.0 or higher

Currently, I am utilizing the latest context API of React (v16.6.0 or higher) by specifying the public static contextType inside the component that consumes the context. Everything works smoothly unless the component declaring the Provider directly include ...

Issue with Vue plugin syntax causing component not to load

I'm facing an issue with a Vue plugin that I have. The code for the plugin is as follows: import _Vue from "vue"; import particles from "./Particles.vue"; const VueParticles = (Vue: typeof _Vue, options: unknown) => { _Vue. ...

TypeScript: manipulating generics T and U

Currently, I am in the process of developing a library with the following API structure: export var reduce = <T, U>( tArray: T[], tReducer: (current: U, tItem: T, index: number, tArray: T[]) => U, options: IChunkifyOptions = DEFAULT_OPTIONS ...

The RouteParams encounter a problem because it is unable to resolve all parameters

I'm encountering an issue with the RC3 router. The error message I am receiving is: Can't resolve all parameters for RouteParams: (?). Below is my code: //route.ts import {provideRouter, RouterConfig} from '@angular/router'; import {H ...

SQL Order - A common key shared between two distinct tables

I need to retrieve data from two tables, Table A and Table B. Both tables have the following columns: ID, Items, Data, Pos for Table A and ID, Apples, Oranges, Pos for Table B. How can I retrieve all results from both tables ordered by position? Can I use ...

Error in strict mode: Undefined variable in Angular 2 inline template

My Angular 2 application has been throwing an error message stating "Error: Error in ./SampleComponent class SampleComponent - inline template caused by: Variable undefined in strict mode". Strangely, this error only occurs in IE 10. <input type="text" ...

When interacting with the iframe in an Ionic3 app, it suddenly crashes

Greetings! I have integrated a flipping book URL inside an iframe: <ng-container> <iframe [src]="eUrl" id="flipping_book_iframe" frameborder="0" allowfullscreen="allowfullsc ...

Tips for optimizing JSON parsing and database writing for faster performance

I have a task that involves parsing a 200MB json file and then writing the data into an sqlite3 database using Python. Currently, my code executes successfully but it takes about 9 minutes to complete the entire process. @transaction.atomic def create_dat ...

TS6054: The file 'app/app.ts.' is using an invalid extension

Error Message: "error TS6054: File 'app/app.ts.' has an unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts' ...

Angular 8 directive for concealing phone numbers

I am currently facing an issue with my phone mask directive that is designed to accept US format phone numbers. The problem arises when I try to clear the input by deleting one character at a time using the backspace key, as the value in the input field do ...

Exploring Angular's ngFor feature in building a dynamic accordion menu that automatically closes one panel and opens another when clicked

The Angular Material accordion component is a key feature in my Angular project. Utilizing an ngFor loop to iterate through the information stored in menuItems, I dynamically create a new expansion panel for each item. With two components in play, I seaml ...

Troubleshooting installation issues with npm and yarn in Visual Studio Code

I've been facing an issue while trying to set up a server development in Visual Studio Code. Despite having all the necessary prerequisites, I keep encountering errors. https://github.com/cobiwave/gatsby-simplefolio#readme Upon reaching the step whe ...

Encountering sqlite3 installation issue on BeagleBone Black with npm install

I'm having trouble installing SQLite3 for NODE.JS on my BeagleBone Black. No matter what I try, I keep encountering various errors. I've gone through a few threads on Stack Overflow but haven't been able to resolve the issue. My latest atte ...

TypeScript Yup schema validation combined with the power of Type Inference

I currently have a unique data structure as shown below: type MyDataType = | { type: "pro"; content: { signedAt: string; expiresOn: string }; } | { type: "default" | "regular"; content: { signed ...

Drawing coordinate lines on a two-dimensional array that simulates a grid

Are you solving a challenging code problem from the advent of code series? Check out the problem description here. The task involves processing input data in the form of coordinate lines on a grid (x1,y1 -> x2,y2). The goal is to populate a 2D array wi ...

Application of TypeScript Utility Types

interface Product { productName: string; productPrice: number; } // Custom Type X type Properties<T> = keyof T & string; // Custom Type Y without "& string" type Properties<T> = keyof T; type PropertyNamesOfProduct = Properties<Produc ...

Tips for changing window.function in Typescript

I'm attempting to log when a method is automatically called. (I found the code snippet on ) augment(withFn) { let name, fn; for (name in window) { fn = window[name]; if (typeof fn === 'function') { ...

Explore an array to find out the frequency of each object's usage

Within our system, we have two arrays: AnswersList[], which contains all potential answers for questions. We then further divided AnswersList[] into six separate arrays: gender, age, disability, ethnic origin, religion, and sexual orientation. For this spe ...

Issues with displaying data in Angular Material table

I am having trouble displaying data in a table. The data shows up when I display it in another element, but not in the table. Here is my code: <mat-accordion *ngIf="posts.length > 0"> <mat-expansion-panel *ngFor="let post of p ...