Category "node.js"

npm error transpileDependencies.map is not a function

this gives me an error when I try to run the program I deleted node and reinstalled, but it still gives an error

Sequelize how to return result as a 2D array instead of array of objects?

I am using Sequelize query() method as follows: const sequelize = new Sequelize(...); ... // IMPORTANT: No changed allowed on this query const queryFromUser = "

"Illegal argument to function" in Postgres when doing select on a view with pgp_sym_decrypt() expression

I am using pg_sym_decrypt/encrypt to decrypt/encrypt some of the fields in my table. Decryption happens on select in a separate EntityComputed view that has a o

Sencha Architect model REST proxy gives error

I have a local Nodejs server running on port 5000. I use Sencha Architect and I want to load the API with the name "getUsers" from my Nodejs server. Here's my m

Mongoose.connect keeps coming back undefined

I have this mongoose.connect statement in my server.js file: const db = mongoose.connect(config.db, { 'useNewUrlParser': true, 'useUnifiedTopology': tru

How to automate my first Telegram application?

I'm just learning the backend. I created my first application, all it does is get data -> publish it to a Telegram bot. I want the application to work 24/7.

Node.js EJS Include feature is not working in my case

I want to include header.ejs and footer.ejs into order.ejs. The image below my folder structure. But, I've got error. The code related to include in order.ejs

unable to determine transport target for "pino-pretty"

I am trying to use pino library but I am getting error My code I created a logger.js file and imported pino from node_module and added transport of pino-pretty.

Validate Google Identity CredentialResponse JWT using Node.js

I'm currently implementing Sign in With Google on a website of mine using the callback approach. So far it works; a user clicks a button, a network call is made

How can I solve error gypgyp ERR!ERR! find VSfind VS msvs_version not set from command line or npm config?

I want to run this project : https://github.com/adonis-china/adonis-adminify When I run npm install, there exist error : > [email protected] install C:\larag

How to read the .ts configuration file from the root of the project in the npm package (ESM)

How can I read the configuration file (e.g. mypkg.config.ts) from the root of the project in my npm module built on ESM? I found this, and figured out how to do

Downloading JSON file in expressjs and reading it

I have a task where I am given a URL such as https://xyz.json. This URL prompts the downloading of the JSON file into the local. I am now required to read the u

How to add ObjectId only if the ObjectID is not present in the array in mongodb using mongoose?

so I have a schema where I want to add ObjectID to an array of id's in mongoose, I tried adding it unique, but did not work. Most likely because I need to itera

Get interaction's reponse message object discord.js

Si I have this really simple command : let row = new Discord.MessageActionRow().addComponents(...) // The .. is too long so i'll just remove it for this questio

Multer super slow upload after recieving post request with images

Hello I'm on a (ReactJs Node Mysql Express) stack, my website has an events tab which the admin could upload to it events. Each event has a cover photo, inner p

Multer super slow upload after recieving post request with images

Hello I'm on a (ReactJs Node Mysql Express) stack, my website has an events tab which the admin could upload to it events. Each event has a cover photo, inner p

2 x criteria for Match showing no results

I am trying to show results where the sum of records is greater or equal to 4 and the status matches a string. If I leave off the status field it works fine but

Node.js Postgresql problem querying database using 'pg' module

I'm trying to insert data into a 'users' table inside a postgresql database using the 'pg' NPM module. But when I make a POST request, the transaction executes

Object passed by server cannot see the function in a class

I am passing an object from server and I cannot see it pass functions. here is my code. const express = require('express'); const app = express(); const path =

How to get data from one controller by calling it from another controllers in Express without circular dependencies?

I am building an API using express js. I have structured it so that each data model (e.g. user, organization, etc.) has their own modules as such: router - vali