Category "node.js"

How can I upgrade Node JS to v14.x with Ionic 3?

According to errors I faced with this TS/Node project (for a simple TypeScript only REST API) the suggested fix (mentioned here (https://github.com/heineiuo/rip

Error: NJS-069: node-oracledb 4.2.0 requires Node.js 8.16 or later

I am using python to host a local web server. I am using oracleDB in a javascript to execute inserts into the DB. I used browserify to compile the modules. Howe

Heroku push for node Js app stuck at Mongodb connection

Just curious if anybody has come across this error. Might be silly. Seems when I am trying to deploy a Node JS express API with a MongoDB atlas connection it ha

Can't read data in node.js from a Ajax POST request

I need help with a very simple problem, but which for some reason I can't solve. I have a ajax post request that send data to a node.js server. From the server

Jest with TypeScript (Backend - Node/Express) says Cannot use import statement outside a module

I am working on Jest tests for a Node/Express TypeScript backend. I recently learnt about global test setup which I am implementing to reduce similar variables

Node JS: execution-time-wise, is generating array of promises and then using Promise.all better than looping and instantly awaiting every task?

Suppose we have an array of objects that we have to upload to a cloud service, the service will do something with each object and the return a result. The servi

Add extra information

I have massively simplified this code, but the idea is that it generates a random number, does an action then tests the response was the same random number gene

How can I redirect login to current page in react js?

I create a single page application using react. I create protected route but after login, I can access login page after login. If I try to go login route I can

Can't find specific single user email query in Mongodb database?

API response show all user data in database to website UI const [product, setProduct] = useState([]); const [user] = useAuthState (auth) useEffect(() => {

Intermittent (time dependent) error when using Node Package rate-limiter-flexible in Express Node.js application

My overall goal is to apply the basic logic of the package "rate-limiter-flexible" for my Express Node.js application. I've gotten the basic functionality with

cURL and shell task

I am using gulpfile.js in my project to download files and it is working fine. var shell = require('gulp-shell'); gulp.task('folder_xyz', shell.task('curl --out

My JavaScript code is memory leaking, but I don't know how to fix

I have a Discord bot written in Nodejs (JavaScript), but I run into a memory leak issue recently. My code is using ~10GB memory, and it keep increasing. I run p

Mikro-ORM disable filter at controller / resolver level

I have two entities and filters with the same name. Note: cond is different for these two entities. @Filter({ name: "myFilter", cond: (args) => ({

Node.js/MongoDB - Returned document seems to revert back to a promise, even after I've awaited it

I'm doing what feels like a simple query, and this is a two part question. The first is whether there's a better way to do it, given my data structure, and the

How to identify a client with nodejs/express?

I am creating a web app that offers a membership access with a trial period. However, I need to be sure the users cannot create a new account with other credent

sendGrid not delivering emails from a node application hosted on vercel

I'm having issues sending emails via a node application hosted on vercel. I'm currently using sendGrid Email API with a verified domain. On development mode, it

Node.js Request pass response of api call as get response

I'm new to node.js. I'm trying to build a GET Method which is calling an external API. The response which is an octet-stream should be passed through as respons

Node-Postgres Error: timeout exceeded when trying to connect

We have a production deployed Node js application which services a good amount of traffic throught the day. The application is in loopback and connects to postg

What are "signed" cookies in connect/expressjs?

I am trying to figure out what "signed cookies" actually are. There isn't much on the net, and if I try this: app.use(express.cookieParser('A secret')); But

Hydration error due to if statement in Next.js [duplicate]

I am getting three errors due to the if statement in my _app.js file. Error: Hydration failed because the initial UI does not match what was r