293 questions
3
votes
1
answer
118
views
Getting SQLite Syntax Error when saving model in Sequelize.js v7
So, I'm trying to learn full stack by making a list app, and I'm using
Sequelize.js for the database. So far I've got User and List models. I
recently switched to Sequelize v7.0.0-alpha.47. I can't ...
1
vote
1
answer
365
views
How to properly include SQLite3 with an Electron, Electron Forge, Sequelizer set-up in production?
I've been trying to set-up a working Electron application using Electron Forge with Sqlite3 and Sequelize. This has worked great up until where I need to actually build and package, and distribute the ...
-1
votes
1
answer
68
views
I am engaging with Capstone project - prepare online learning system for student and teacher logging
I created my capstone project frontend with Angular.js, and the backend with Node.js and Express. The database was created by sqlite3. I want to update the files in the GitHub repository and use ...
3
votes
0
answers
110
views
WatermelonDB Error: EBUSY: resource busy or locked when switching from LokiJSAdapter to SQLiteAdapter with Node.js
I creted a basic Node.js app with WatermelonDB and LokiJSAdapter and is working fine but when I switched to SQLiteAdapter this error start appering. Any ideas hoe to fix that?
Error: EBUSY: resource ...
-1
votes
1
answer
73
views
Discord.js | Bot's role reactions post does not continue to work between sessions [closed]
I'm trying to set up a /roles command for my Discord bot. The goal is to have the bot post an embed with some automated self-reactions that correspond to self-assignable roles identified in the embed. ...
-2
votes
2
answers
96
views
Search nested array of objects in JSON object
I need to make a query to return an entire row on the condition of a substring search. This search must match a column called 'movies' and it is a JSON Object within it, inside this object is an array ...
1
vote
0
answers
24
views
how to use result set of db.all in db.run command that is just next to it. Given these both are in db.serialize()
db.serialize(()=>{
const rightjoinpromise=new Promise((resolve,reject)=>{
db.all(
'select temp_data.colour,temp_data.size,temp_data.price,temp_data.quantity,temp_data....
0
votes
0
answers
175
views
How to get result from sqlite3 to variable in typescript?
I have a need, for example, to return information about whether the user is blocked, obtained from the database, to the main code. I created a class called Db:
export class Db {
constructor() {
...
0
votes
0
answers
12
views
SQlite3 || How to use return for select in a function [duplicate]
I started learning js relatively recently. I have a function that should return the search result from the SQlite3 table. but because of the asynchrony, it outputs the result before it has found any ...
0
votes
0
answers
52
views
Using sqlite3 js to replace html text
So I want to put out a WHERE query for this 'code' (row.code) and recieve the row.title from there.
With the row.title I want to use js to replace the 'title.placeholder' text with 'row.title'. For eg....
0
votes
1
answer
2k
views
Dockerfile for sqlite3 solving the error with better-sqlite3
in my project I need a Dockerfile for sqlite3 because I am using microservices with Kubernetes and Docker and on Windows and MacOS it gave me the same error when installing.
the project uses nodejs ...
0
votes
1
answer
123
views
Sqlite3 database empty after running migration in javascript
this is db.js
const sqlite3 = require('sqlite3').verbose();
const path = require('path')
const { migrationScript } = require('../db/migrations/migrate');
const WDIR = process.cwd();
const DB_PATH = ...
-3
votes
1
answer
334
views
TypeError: Named parameters can only be passed within plain objects, while trying to handle Sqlite errors using ES6 arrow functions
I have some working code to manipulate a Sqlite database written in this notation (I think ES5?):
try {
const cols = Object.keys(data).join(", ");
const placeholders = Object.keys(...
0
votes
1
answer
133
views
node-sqlite3 running at end of TS
When querying a DB in TS using node-sqlite3 the query happens after everything else.
The docs haven't yielded any answers, though there may be something glaringly obvious that I've missed.
I've ...
0
votes
0
answers
415
views
No debugger available, can not send 'variables' Node.js error when using vs code
I am currently using a node.js for the first time trying to use it to SELECT in an sqlite3 database code it connects to the database and even makes an array with 9 results which is the number of ...
1
vote
1
answer
781
views
My executable file that i compiled with nexe on NodeJS not works on a different location
Note that i’m using NodeJS v16.16.0
When utilizing nexe to compile my file, everything works as expected until I attempt to change the file location at that point, the program ceases to function. ...
0
votes
1
answer
105
views
Express + Sqlite3: How to have statements execute in a certain order?
I am trying to create a table with an item inserted into it upon executing the following script using the node command. However, for some reason my code is inserting the item into the table before the ...
1
vote
0
answers
61
views
Reduce Electron node-modules / prebuild modules size on production
I noticed that 99% of the space in my app.asar comes from node-modules, digging around I found 2 modules sqlite3 and serialport that are the reason for the big size.
As example, sqlite3 takes 74Mb, I ...
2
votes
0
answers
43
views
ExpressJS + SQLite3 - how to pass parameters into IN statement?
I want to build a simple e-commerce site where each product is unique (each has exactly one quantity; all are stored as a separate integer) using ExpressJS and SQLite3.
My problem is with writing a ...
0
votes
1
answer
775
views
Problems when bundling a express/sequelize/sqlite app using esbuild
Edit
I've been bamboozled with regards to the sequelize part. The person responsible by connecting the gateway was pointing to an old endpoint and the answer was returning wrong as a result. I was ...
0
votes
1
answer
49
views
Force instance of Database using all() in serial to update global variable
I am learning sqlite3 in Node.js and having problem with following code
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('first.db');
console.log("in the program");
...
0
votes
1
answer
48
views
Sqlite module not found in expressJS latest
I would like to come and ask for help for an error that is making me mad. The famous "Sqlite3 module not found" I have sqlite3 in my json dependencies. It is installed in node modules. and I ...
0
votes
1
answer
144
views
Sequential run of SQL functions in JavaScript
It seems that the question has been answered here, however, I do not know how to make it work as I am still new to JavaScript.
I have tried to use Node.js with DuckDB and Sqlite3. Both could not not ...
0
votes
2
answers
60
views
Random values are not getting inserted in SQLite Table
I have made a database in SQLite, and a Table. Schema is like this:
CREATE TABLE Students (
StudentID INTEGER PRIMARY KEY,
FirstName TEXT NOT NULL,
LastName TEXT NOT NULL,
Gender TEXT ...
0
votes
1
answer
64
views
sqlite3.OperationalError: no such column: stock_name
#user_input.py
from flask import Flask, request, jsonify
import sqlite3
app = Flask(__name__)
def process_user_input(data):
# Retrieve user input from the data
stock_name = data.get('...
-1
votes
2
answers
2k
views
npm error code 7 while installing sqlite3
Im trying to run a react project. I cloned the git repo and ran the command
npm install
this installed all the dependencies except sqlite3, so i tried to install sqlite3 manually by running the ...
0
votes
0
answers
107
views
Is IPC Communication is an alternative for API in electron apps?
Currently I'm learning to build electron app , I'm just trying to figure out if IPC Communication is the right way to access local SQLLITE db from front end and make it act like a API , or is there ...
1
vote
0
answers
77
views
Problems using sqlite3 while processing images with sharp
I'm downscaling images within a separate worker thread using the sharp library. The code snippet goes like this:
async function create_preview(path) {
return lib.sharp(path)
.resize({ width: ...
1
vote
1
answer
2k
views
SQLITE_RANGE: column index out of range : SQLite
I have a simple sqlite SELECT query as follow,
db.js
const dbFile = path.resolve(__dirname, ../disk.db);
const dbExists = fs.existsSync(dbFile);
if (!dbExists) {
console.log("database file ...
0
votes
1
answer
293
views
inserting a list of entries into sqlite using knex on expressJS with unique field constraint
I am trying to insert a list of exercises into sqlite DB. The app is on express JS and I am using sqlite3 and knex to interact with the DB. I am trying to add a list of exercises into the table ...
1
vote
0
answers
49
views
i want sqlite3.node file of version 83 from nod.js v8.3
My node application is currently running in node version 8.3. I am getting above error of missing \node-v83-win32-x64\node_sqlite3.node' module in node_modules. When i try to install the same by ...
0
votes
2
answers
64
views
Problems opening an endpoint for the front-end to fetch [closed]
As said in the title, I'm writing a aplication in Node.Js and I need it to return a JSON (or at least console.log() the data, I can figure out the rest) I it seems like the URL doesn't exist
BACKEND ...
0
votes
1
answer
1k
views
Is it possible to read a sqlite db file that reside in S3 from lambda function (nodejs)?
I have a sqlLite db file that is reside in S3 bucket. I am trying to read the information (mainly read) from the tables to be transform to json. I saw the nodejs with sqlite3 but somehow I can see to ...
2
votes
0
answers
66
views
`SQLITE_RANGE: column index out of range` while trying to full-text search SQLite database
I'm trying to use the sqlite3 package to perform a full text search of an SQLite database. To do this, I have made the following function:
const searchDb = (query, column, callback) => {
const ...
0
votes
1
answer
384
views
Am I using promisify() with bind() correctly?
I am writing middleware to return database queries using SQLite3 and Next.js. Here is a snippet of code that I wrote to return the contents of a DB table. It appears to work, and my checks of sources ...
1
vote
2
answers
480
views
Issue with async SQLite statement execution wrapper functions
I am having an issue executing an SQL statement immediately after creating and populating a table.
I think the record does not exist, because the creation query does not finish in time.
If I pass ...
2
votes
1
answer
753
views
sqlite3 with docker throws MODULE_NOT_FOUND error
My node application works on my local(MacOS), but it does not work if I use docker.
it works if I try local:
npm install
npm start
It throws error if I try docker
docker-compose build
docker-compose ...
0
votes
0
answers
414
views
MODULE_NOT_FOUND error - Not able to run the node js application with sqlite3 in the docker container
I facing this below error while running my nodejs-16 application using docker. I started facing this issue after I update my node from v14 to v16. I googled but couldn't understand.
Can someone throw ...
2
votes
0
answers
242
views
Running sqlite3 with react fails with error
In my React web app I want to read from local sqlite db file. From what I understand it can be done via sqlite3 service package. After installing npm install sqlite3 and executing the following code I'...
1
vote
0
answers
782
views
npm install sqlite3 fails after npm cache clean
I'm trying to install sqlite3 in order to develop an express.js backend with sequelize. My operating system is Ubuntu 22.04. My Node version is 18.13.0, npm version 9.3.1.
My current situation is:
>...
0
votes
1
answer
252
views
Unable to deploy my full-stack web application. I get SQLITE_CANTOPEN: unable to open database file
I am trying to deploy a web application. I have it up and running on my computer, but when I try to deploy it using render.com or Cyclic, I get the following error:
SQLITE_CANTOPEN: unable to open ...
1
vote
1
answer
458
views
Rows is not Iterable Error in EJS response
Hello I am getting an error in my EJS response file I am trying to display my form data that makes a request to my database on the server side and I am getting this error here is the Form Code and ...
0
votes
1
answer
2k
views
How to iterate rows sequentially in sqlite3 and nodejs?
I want to iterate through my sqlite database synchronously.
Using async and sleep in db.each() does not delay the each callback since it does not use await on the callback internally:
var sleep = ...
2
votes
0
answers
28
views
Async and await does not work in sqllite3 in nodejs [duplicate]
I try to Insert query into sqlite database. But the function Does not work correctly.
const sqlite3 = require('sqlite3');
const { open } = require('sqlite');
async function main() {
try {
...
1
vote
1
answer
1k
views
Composite primary key with sequelize-typescript and node-sqlite3
How can i create the following composite primary key (using sqlite) with sequelize-typescript?
CREATE TABLE files(
`hash` VARCHAR(255) NOT NULL UNIQUE,
`filePath` VARCHAR(255) NOT NULL UNIQUE,
...
1
vote
1
answer
420
views
typeorm SQLITE_BUSY:database is locked
I'm using multiple processes to write and read to an sqlite DB and am running into a busy error:Error: SQLITE_BUSY: database is locked.
Then I try to set the enableWAL parameter to true and the ...
0
votes
1
answer
549
views
Raspberry Pi 4: Error: Cannot find module 'sqlite3'
Status of sqlite3 installation on my Raspberry Pi 4 B when queried from the terminal:
pi@raspberrypi:~ $ sqlite3 --version
3.27.2 2019-02-25 16:06:06 ...
1
vote
1
answer
1k
views
What is the best way to INSERT multiple rows in a SQLite table
My problem mainly is performance related, I have this code running on the main ElectronJS proccess :
ipcMain.handle('add_product', async (event, args)=>{
return new Promise((resolve, reject)=...
-2
votes
1
answer
171
views
Using sqlite3 in node.js with already installed sqlite driver
I'm currently developing for an embedded system. It already has sqlite3 pre-installed:
root@xxx-imx6-r1:/# sqlite3 -version
3.38.5 2022-05-06 15:25:27 ...
0
votes
0
answers
173
views
Delete Method in Swagger mit SQLite3 und NodeJS
I have OPENAPI, which are build with Swagger. GET und POST methods works finei. but not DELETE.
index.ts
`
app.use("/deleteProduct/{id}", deleteProduct);
delete.ts
import { Router } from &...