How can I get electron to interact with sqlite3 databases?

I've exhausted all my options and still can't get it to function. This error message keeps popping up:

https://i.stack.imgur.com/D5Oyn.png

{
  "name": "test",
  "version": "1.0.0",
  "description": "test",
  "main": "main.js",
  "scripts": {
    "start": "electron .",
    "rebuild": "electron-rebuild -f -w sqlite3"
  },
  "repository": "https://github.com",
  "keywords": [
    "test"
  ],
  "author": "GitHub",
  "license": "CC0-1.0",
  "devDependencies": {
    "electron": "~1.6.2",
    "electron-rebuild": "^1.5.11"
  },
  "dependencies": {
    "bootstrap": "^4.0.0-alpha.6",
    "electron-fetch": "^1.0.0-aplha4",
    "electron-handlebars": "^1.0.0",
    "electron-prebuilt": "^1.4.13",
    "electron-rebuild": "^1.5.11",
    "electron-sqlite3": "^0.0.3",
    "font-awesome": "^4.7.0",
    "jquery": "^3.2.0",
    "sqlite3": "^3.1.8"
  }
}

Within the code snippet, I'm utilizing:

const sqlite3 = require('sqlite3').verbose();
let db = new sqlite3.Database(':memory:');

Any suggestions on how to resolve this issue?

Answer №1

Did you run the electron-rebuild for sqlite3 already?

$ electron-rebuild -f -w sqlite3

or

$ npm rebuild

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

"Is it necessary to run npm install twice for a package installation

Whenever I need to install my dependencies, I always use the command npm install. Unfortunately, during one attempt, a few of the packages failed to install properly. To fix this issue, I simply ran npm install again. I'm now wondering if npm will ...

What is the best way to incorporate a button for toggling CSS animations?

I need help adding a button to toggle the animation on this JSFiddle. I tried adding the code below but can't seem to start and stop the animation. body .a [class^="b"] { width: 200px; height: 142.8571428571px; margin: 0 auto; ...

Implementing PrimeNG with angular2-seed: A Step-by-Step Guide

I have successfully configured an angular2-seed project, but I am facing challenges while trying to integrate PrimeNG into my environment. My first step was to install Primeng and PrimeUI: npm install primeng --save npm install primeui --save After inst ...

What could be the reason for the failure of running the command `meteor npm install --save angular

Encountering a major problem with meteor npm install while using: Meteor Angular Meteor The issue arises when trying to import ui-grid, similar to importing uiRouter or angularUBoostrap. However, this has proven to be extremely difficult. I have attemp ...

Prevent the box from closing automatically after submitting a form using jQuery

Despite my efforts to keep a simple dialog box open after submitting a form, it continues to close. I tried using the preventDefault method in jQuery, but it didn't solve the issue. Below is the code snippet: $(document).ready(function(e) { $(&apo ...

Having trouble with JavaScript/JQuery not functioning properly in HTML content loaded using the load() method

My goal is to load an input form from a separate file called new_machine.php into my index.php. This form includes an input with a dropdown that retrieves options from a MySQL database and displays them as anchors. The issue arises when I attempt to manipu ...

What could be causing this function to malfunction?

Apologies for any inaccuracies in technical terms used here. Despite being proficient in English, I learned programming in my native language. I am currently working on a project using the latest version of Angular along with Bootstrap. I'm unsure if ...

What is the best way to retrieve a file's creation date using the file System module in Node.js

I'm having trouble fetching the filename and file creation date to send to a client. I tried using fs.stat which provides birthtime but does not include the filename. So, my question is: is birthtime equivalent to the file created date? How can I sen ...

Implementing child components in React using TypeScript and passing them as props

Is it possible to append content to a parent component in React by passing it through props? For example: function MyComponent(props: IMyProps) { return ( {<props.parent>}{myStuff}{</props.parent>} } Would it be feasible to use the new compone ...

What is the best way to extract the date and pricing information directly from an interactive graph using Python?

My attempt to gather data from a graph using web scraping with the Selenium library was unsuccessful. The graph can be found at this link. from selenium import webdriver driver = webdriver.Chrome() driver.get('https://www.mtgprice.com/sets/Ravnica_All ...

"Optimizing Package.json with GIT Workflow: Implementing separate dependencies for the develop and master branches

In our software development process, we implement the GIT Workflow with branches such as develop, master, feature, and release. Currently, our software has internal dependent packages specified in the package.json file, sourced from our enterprise GIT repo ...

Efficient Ways to Store Text and Images in Vue.js

I have developed a tool that enables users to upload an image and overlay custom text on it, which can be viewed and edited in the browser. My query is whether it is feasible to save the combined image and text as separate files (e.g., jpg/png) using VueJS ...

The paragraph text should dynamically update upon clicking a button based on JavaScript code, however, the text remains unchanged despite attempts to modify it

I recently started learning JavaScript and wanted to update the content of a paragraph when a button is clicked. However, I encountered an issue where this functionality doesn't seem to work. <body> <p id="paragraph">Change Text on cl ...

Creating a precise regular expression for route length in Express JS

Currently, I am facing an issue while setting a route in my application. I want the URL parameter to be exactly 2 characters long, but unfortunately, the following code snippet is not producing the desired result: app.all('/:lng{2}?',function (r ...

A blank page is appearing mysteriously, free of any errors

I have experience with ReactJs, but I am new to Redux. Currently, I am working on implementing an async action where I call an API and display the data received from it. Initially, when all the Redux components (actions, reducers, containers) were on a sin ...

When the onClick event is triggered, my intention is to dynamically insert a new

I'm having trouble adding a new row on each click, as my code keeps replacing the existing row. I attempted moving the if statement outside the addTable function, but it didn't work as expected. I've tried multiple solutions without succes ...

Azure DevOps private build agent - 'webpack' is throwing an unfamiliar error and cannot be identified as a valid internal or external command

Issue: Our Private build agent is encountering an error that states: "'webpack' is not recognized as an internal or external command" when attempting to run npm run build:prod. Attempted Solutions: Installed webpack globally using: npm inst ...

The Electronjs application encountered an error while loading with the message "ReferenceError: require is not defined."

Having trouble with an electron application as I encounter an error when running npm start: $ npm start > <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="483c2d3b3c087966786678">[email protected]</a> start C:& ...

The property cannot be set for an undefined element in Jquery UI slider tabs

There seems to be some extra space at the bottom of the slider tabs between the navigators and content. Additionally, I am facing a challenge in making the page responsive as the content size does not adjust when I resize the window. To see the changes, I ...

Vue - Passing a parent's ref to a child component as a prop

Is there a way to pass the current component's reference to a child component in Vue.js? <template> <div class="screen" ref="screen"> <child-component :screenRef="screenRef"> </child-component> </div ...