Quantcast
Channel: Active questions tagged express - Stack Overflow

Image may be NSFW.
Clik here to view.

Don't see logs on the server side when using console.log

This is the first time in my life I touch js or node so please bear with me. I am trying to make my app output logs on the server side. getUser.onclick = function () { console.log('Server running at...

View Article


Streaming video from S3 with Express/NodeJS to play in Safari

I am using SSE-C encryption for S3 files, so when playing back the video, I am forwarding the request to S3 through the server by attaching params correctly.export default async function(req, res) {...

View Article


Server side redirect with ReactJs

I am trying to issue a server side redirect for certain pages for SEO reasons. The problem I am trying to solve is that some of my pages will get index by google, so if they are deleted or taken...

View Article

npm warns about memory leak in a transitive dependency of bcrypt

ContextAfter installing bcrypt, I received several warnings about deprecated packages, but the first one is especially troubling:$ npm install bcryptnpm WARN deprecated inflight@1.0.6: This module is...

View Article

Error: WHERE parameter "id" has invalid "undefined" value

I'm making an API with Express.js and Sequelize for an appointment scheduling app. So far I have two models, User and Salon, with an N:M relationship. (So an user might manage many salons, for a...

View Article


Error: querySrv ENOTFOUND _mongodb._tcp.dbname.fzofb.mongodb.net

I'm learning Node.js and just started working with MongoDB.I'm making a connection with the MongoDB Cluster I've createdconst dbURI =...

View Article

How to autogenerate API documentation from Express route mappings?

I am developing a REST API in nodejs + Express and I have been simultaneously documenting my API in the README file and I was wondering if it is possible to automate it. e.g. given:app.get('/path/to',...

View Article

Case-insensitive queries with Amazon Dynamo DB

In In DynamoDB, string values are case sensitive. In my app, users can search the db for a profile name. However, if they searched for, say 'alan', then 'Alan' would not be returned in the search...

View Article


How to set up an update route in Express

I am building a MEVN stack CRUD app (Vue, Node, Express, MongoDB). I am attempting to set up the following Express route for my app...postRoutes.post('/update/:id', async(req, res)=> { const...

View Article


NodeJs : How to send very large data from server to client

I am using Express Framework. I am trying to send very large data from server. The Client receives 200 OK status but no data. Also it gives error ERR_CONTENT_LENGTH_MISMATCH even though I am sending...

View Article

Cannot find module: internal/modules/cjs/loader.js:969

I wanted to run my app and I suddenly got this error. Why?this is what my order looks like in which i work../├─ app.js├─ .env├─ .gitignore├─ node modules/│└─ ...├─ package.json├─ package-lock.json├─...

View Article

How to get all registered routes in Express?

I have a web application built using Node.js and Express. Now I would like to list all registered routes with their appropriate methods.E.g., if I have executedapp.get('/', function (...) { ......

View Article

Unexpected token '

For the past few days, I have been attempting to solve this error. I am extremely baffled, as I have no idea why this isn't working. Any help or suggestions would be greatly appreciated.When I attempt...

View Article


How to add custom message on Zod tuple?

I want to return a custom message on a Zod tuple. I did not find any way to do that.Returned message:Array must contain at least 4 element(s)Code:z.tuple([ z.enum(), z.number(), z.string(),...

View Article

TypeError: Cannot read property 'access_token' of undefined

I am creating a discord bot dashboard website with express and i've been getting this error but can seem to fix it: TypeError: Cannot read property 'access_token' of undefined. When I run the code...

View Article


Image may be NSFW.
Clik here to view.

NodeJS only listens on localhost

I have developed a NestJS Server application. NestJs is a node server running with express written in TypeScript. Now I want to deploy the application on my rapsberry pi. However, I'm only able to...

View Article

Retry async/await try and catch block three times before responding with an...

Found similar issues, but none of which answered my question. I need to try to run an async function three times before throwing an error. Currently doing it with a while loop doing, which doesn't feel...

View Article


how to increase memory heap in nest.js application ? how to use...

I am working on node.js project with nest.js framework and I had the error "JavaScript heap out of memory"my question is how to allocate more memory to my app?. Also I found some people say that I...

View Article

What is routes/index.js and its purpose?

What is the purpose of this file? Is this where 'all' the get and post calls get instantiated?If so, wouldn't this be a very huge file when working with large scale projects?I've tried calling a post,...

View Article

How to fix the issue as: "at process.processTicksAndRejections...

I want to send a token back to the user to reset his password, but I am getting this error:Error: there was an error sending the email, try again laterat exports.forgotPassword...

View Article

Google Sheet integration in Express JS

How can I create a feature in Express JS where users can authorize their Google account with our app. So, we can fetch the google sheet from their accounts and show it in my express app, and if users...

View Article


Request body undefined in express

When I log the request body in the application it gives me undefined. I read it usually is for bodyparser; I tried to add it but it remains undefined.import express, {type Express, type Request, type...

View Article


Store session data using MemoryStore in Node, similar to $_SESSION['data'] =...

Question:Is it possible to store session data similar to $_SESSION['somedata'] = "Hello" in php?Here is my code so far:Creating the memory storevar MemoryStore = express.session.MemoryStore,...

View Article

Why I can't import .ts file using express and typescript [closed]

I am tryng to import a controller with .ts extension but i am having trouble.I exported with export const registerWhen i import the controller with .ts extension i am getting an error.I imported the...

View Article

Express - Session mismatch, user ends up on other user

Have a major problem that user sometimes ends up on wrong user.Have the following setup in app.js. var session = require('express-session'); var RedisStore = require('connect-redis')(session); var...

View Article


Image may be NSFW.
Clik here to view.

typescript error - cannot find name 'process'

I am setting up a new project with express+ typescript and facing typescript error - cann't find name 'processs'package.json"dependencies": {"express": "^4.16.4","nodemon": "^1.18.7","tsc":...

View Article

How can I scan an S3-compatible object storage file with VirusTotal API using...

I am trying to scan an image for viruses using the VirusTotal API.The image is stored in an S3-compatible object storage (Backblaze B2), and I am using the AWS SDK for JavaScript to retrieve the...

View Article

How to solve : Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they...

I have a node/express server code asindex.jsconst express = require("express");const Room = require("./models/room");const roomRouter = require("./routes/room");require("./models/db");const cors =...

View Article

Image may be NSFW.
Clik here to view.

Running the node-express app live in render.com with query throws internal...

I'm trying to run a route live with query using nodejs express app in render.com. All other routes related to the crud operations are getting executed except the search filter route url with the...

View Article



Deploying to vercel

Hello i'm having issues deploying my website/app to vercel. It's a node/express backend and a create-react-app front end.I should start by saying that localy everything works perfectly.As for...

View Article


Latest Images