Category "node.js"

Babel (expo) avoid compiling some dev only packages

Currently I have to use some cookie jar to make axios work in jest. axios.defaults.headers.post['Content-Type'] = 'application/json' axios.defaults.headers.comm

Nest JS Circular Dependency Issue - Mongoose Module

I am trying to inject dependencies in mongoose module for root async. I want to kind of simulate a cascade delete using mongoose hooks. I have this module, whic

NodeJS FTP not throwing error when trying to delete non-existent file

I am working with ftp-npm and I am currently facing a weird bug... I have a method called refreshStore that contains this part of code : c.delete('/pathToMyFile

Unauthorized Error when I want to delete article with authentification (jwt)

I've created a route called login and another one function(middleware), if the authentication is good, this can be redirected to the delete route but unfortunat

Electron Amplify AppSync "Realtime disabled when in a server-side environment"

I'm using amplify appsync in my electron app and all works except for the realtime events which means my app doesn't get signalled when the data changes in the

Apify do not push items in map function

I have this function that call a new one with _.map function that cycle each element or array an than it could push items in Apify Storage, but the element of d

Sequelize: find count of 3 level associated model entries

I have a products database structure as follows: Categories > Sub categories > Child categories > Products the respective table names in mySql database

Apollo-Server display errors in a clean mannor

I'm pretty sure that the question is self explanatory. I'm using 'apollo-server-core' 3.6.5 Errors I want to get { "errors": [ { "messa

graphql syntax error inside schema with mogoose

schema const { gql } = require("apollo-server-express"); export const typeDefs = gql` type User { id: ID! name: String! email: String! password

Reusing Redis Connection: Socket Closed Unexpectedly - node-redis

First, let me tell you how I'm using Redis connection in my NodeJS application: I'm re-using one connection throughout the app using a singleton class. class RD

How can i parse a base64 from a PDF buffer to a HTLM / JSON / PLAIN-TEXT?

I'm implementing a web scrapping service, and it must have the capability to read specific data from pdf's. This service is being executed in a EC2 instance and

How to draw Genogram relationship tree using ReactJs?

I'm looking for a simple Javascript Library (SVG) for the ReactJs module that allows me to draw family tree relationships. I've already referred GoJs Genogram.

nodeJS - How to run cron job to send telegram bot messages

I have this code in my telegram bot: const fs = require('fs/promises'); const keyFile = 'luminous-re1c7.json' const { Storage } = require('@google-cloud/storage

multer save file, nidejs angular

i want to save an image on nodejs, i am sending the file via post, whith angular like this: ... flag: File; flaginput(event){ this.flag = event.target.files[0

knex - postgres migrations on multiple schemas with same database

I am using postgres,knex and node.js in my project. There in my postgres database , I have two schemas. so when I'm doing knex migrations it works properly, but

vsCode dependencies bug with nestJs

my vsCode bug to recognize dependencies when i program with nestJs, after setting up the project with: nest new projectname then after running for example: npm

Not able to display fetched data on page, React JS

I am unable to display fetched data on page. Here I am using ReactJS for frontend and NodeJS for backend. To store data I am using blockchain (hyperledger fabri

How to modify & replace the key an object by comparing it with other objects?

I have an array of object which consists some id's as a key. const sampleObj1 = {0011:[{},{}], 0022:[{}, {}], 0033:[{},{}]} const sampleObj2 = [{id:0011, name:'

npm err! code 1 in the vscode during installation for Angular

I'm trying to execute a code I have downloaded from the github in my machine. I have set the ambient for angular in the vscode and the issue npm ERR! code 1 is

GridFS Large File Download Crashes the Node.js Server. MongoServerError: Sort exceeded memory limit of bytes

So I'm running a Node.js server with mongoose and I've been trying to download a large file using the GridFS node package but I've been getting the following er