Category "node.js"

Resolving 'Illegal-mix-of-collations' MYSQL error in node

I am connecting to a mysql database from node using mysql2 and have been experiencing intermittent illegal-mix-of-collations errors - see this question. The col

how to add digital signature to hash data in node js use .cer file?

I'm new to digital signatures and how to use them, so I can't complete my task. Sign the hash with the CADES-BES signature. Insert a new element with a Base64

How to get mongo documents created in the last 24 hours using mongoose?

I have this mongoose schema const PictureSchema = mongoose.Schema({ user: { type: mongoose.Schema.Types.ObjectId, ref: 'User', requi

Net to setup simple if and else statement in node.js

trying to setup node.js code i want to setup simple if and else can anyone help to setup if and else // To use any npm package on Pipedream, just import it i

Why does my Discord bot keep repeating when it runs this command?

This is the code used, there is nothing (I think) that's causing it to repeat, matter of fact I added something so it stops repeating but it didn't do anything

i am trying to run the node of ganache but getting this error

I am trying to run the node of ganache but getting this error.please resolve my problem.

jwt.verify not throwing error for expired tokens

I'm using JWT - jsonwebtokens in Nodejs. I'm creating a token and want to throw an error if the token expires. My token is created successfully and I'm checking

npm install --timing not saving full debug log

I'm running npm install --timing, and when it completes it will output something like: npm ERR! A complete log of this run can be found in: npm ERR! /Users/

Why there is this "ip" field in a bittorrent dht querying response?

I was debugging this dht implementation when I came across this query response (KRPC type r). Theres no documentation about an "ip" field in BEP5, so why is thi

Extract Color Matrices Used by Filter?

I am trying to detect the color matrix applied to a filtered image so that I can apply a reasonably close approximation of the filter using fabric. Does anyone

MongoDB atlas connection error with nodejs

enter image description here This error is showing when I connect the MongoDB now how can I solve it

How To Mock a Dependency Class in Typescript Node Using Chai-Spies

Given something like my-module.ts that will be called by an external consumer that of course cannot do dependency injection to this module's constructor: import

Error creating json file in node js

I have followed many solutions provided in the previous questions but mine is not working. The problem is in .json extension. Whenever I use filename.json, the

What's the codes such as [?2004l means in SSH result?

Got such result when using ssh2 in electron: [?2004l [?1h= [1;24r[m[m[0m[H[J[2;1H[1m~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~[0m[24;63H0,0-1[9CAll[6;32HVIM -

Unable to publish scoped NPM package on internal Artifactory

i am trying to publish a simple (there is only a js file inside) scoped NPM package on my company's Artifactory. I followed all the documentation available both

error: missing FROM-clause entry for table "x" Express

Trying to fix up my first node/express GET request. Having some trouble getting it working though. I currently am getting this error: error: missing FROM-clause

Safe electron app that makes requests to another server web application

I want to create an electron app that supports sns features(upload videos, photos, basically share some info (nothing personal). I know that electron only has a

SyntaxError: Unexpected token '||=' on import of pdfjs-dist

Trying to use pdfjs-dist in node js app Steps: created new node js app (module) then:- npm i pdfjs-dist package.json is:- "name": "testpdf", "version": "1.0.

How to fill all fields using puppeteer?

I use page.type to fill a field using puppeteer. If you have a multiple selector, then it will fill the first found field. My goal is to fill all inputs that ma

npm install -g @ionic/cli Unexpected token '.'

I want to install ionic 6 on my system. I have installed multiple versions of npm on my system using nvm . nvm ls D:\<user_name>\Projects\Ionic-6>nvm l