Category "node.js"

Aws documentdb MongoServerError: Authorization failure while connecting using mongoose

error: [nodemon] starting `node server.js` app listening on port: 5600 /home/ubuntu/cnox-webbackend/node_modules/mongodb/lib/cmap/connection.js:203

Cannot find memory leak in my Express.js Jest tests

I've now spent some time trying to find memory leaks in my Jest tests, and even though I've successfully tackled some, there's still quite a lot of memory being

How to redirect to new page with Authorization Headers after login?

I have a login page. On click of login button, the details are sent to server and are validated. A token is received in return after successful validation. I ne

Error for expo-cli when installing with Node 18

I am trying to install expo-cli and there appears to be an error related to the node version. Is there a way to install it without installing Node 16? I have e

Return many files with json from backend to client

I want to know may i respond to client from backend controller with many files (with application/octet-stream). It will be more better, if i respond array of fi

MQL5, Python, Javascript integration. Two (or more) computers

Any MetaTrader/MQL + python integration gurus here? It is my understanding (please correct me if I'm wrong) that I can follow the instructions here to build the

MY SQL Sequelize Unique Value not working as intended

I am trying to code a website to work with ReactJS, NodeJs and MySQL. I have been using Sequelize and it works but i realised that it allows all usernames even

Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (88)

I have tried to install gulp-sass latest version with npm i gulp-sass --save-dev in the begining I got a lot of errors but later solved them. But whenever I tr

How to Polyfill node core modules in webpack 5

webpack 5 no longer do auto-polyfilling for node core modules. How to fix it please? PS: I'm a beginner in development so solution must be well described fo me.

The proper way to achieve database locks (Pessimistic Read and Write) with TypeORM and NodeJS

I have an application that needs to deal with concurrency/race conditions. I noticed user account balances were being updated wrongly. Multiple requests can rea

What should the response status code be in a REST API when the given ID is a valid ID but there's no matching document?

I'm using MongoDB for my Express app and I know that when an ID is an invalid ID for the corresponding database, the response status code is 400 (Bad Request).

Node.JS Video Upload

Can anyone help me with video upload in Node.JS? Currently, I am using the express-fileupload module for uploading a video it works fine till 70MB but when the

Why do I need Visual Studio and C++ to install node modules

Recently I have upgraded my node version to 14+ from 10+ in a Vue.Js app. But It was giving me some error and asking to install Visual Studio including C++. Whe

Can't request to https://registry.npmjs.org using nodejs

I want to write a program to show some npm packages, there's example code: const https = require('node:https') const url = 'https://registry.npmjs.com/vue' co

Hide nested properties in loopback model

I am creating a loopback model (model1) which refers to another model and want to hide some properties of the nested model (model2). Also, I just want them to b

How to get query result from postgraphile running as a library

I have postgraphile running as as express middleware. For example: const pgMiddleware = postgraphile(pool, SCHEMA, postgraphileConfig); app.use(pgMiddleware);

How to resolve "Uncaught ApiError Error: Project project-name has been deleted." issue in VSCode for Google Cloud function development?

I am very much new to GCP & Node JS, recently I started working on a cloud function development in Nodejs.I researched many websites to begin my development

Cannot install node-sass on windows

Im trying to install node-sass. I have both python 3 and 2.7 installed along with the visual studio build tools yet node gyp still fails. Trying to uninstall an

How to upload contentBytes chunk by chunk on Graph url return by createUploadSession graph API?

As per microsoft graph API documentation the createUploadSession graph API only return the URL where attachment can upload but how to upload attachment chunk by

Error with node-sass when running npm install

I'm getting the following errors whenever I run npm install on a vue.js project 5769 error code 1 5770 error path /*my path*/node_modules/node-sass 5771 error c