473,664 questions
4
votes
4
answers
161
views
Is `console.log()` considered a side effect in JavaScript?
I was learning about side effects in JavaScript, and I came across the idea that console.log() is considered a side effect. However, I'm not entirely sure why.
For example, in the following function:
...
-1
votes
0
answers
38
views
mongoDb cant find user in adminDB
I am just starting to learn Nodejs and MongoDB, unfortunately I have a problem right at the beginning.
after I have created a MongoDB with user and password via Docker (a Docker desktop is running in ...
1
vote
0
answers
47
views
Unable to connect AWS lambda to Mongodb through VPC [closed]
AWS Lambda MongoDB Atlas Connection Timeout Issue (VPC Peering)
I have an AWS Lambda function that connects to a MongoDB Atlas cluster. To enable this connection, I have:
Configured a VPC and peered ...
0
votes
0
answers
62
views
How can I retrieve the "hs_sku" property from a HubSpot Product in my Node.js application?
I'm developing a Node.js application that interacts with the HubSpot API using the @hubspot/api-client package. I am trying to retrieve detailed information about a product, including its "hs_sku&...
-2
votes
2
answers
128
views
How to make a background bash script pause while an npm build runs?
I'm setting up a new method of deploying my personal react website, which is using vite for bundling. My idea is:
I push un-bundled changes from local to remote repo
a web hook informs my server (...
1
vote
1
answer
40
views
Next.js + Mongo/Mongoose query taking 3+ minutes in local dev: “DB Query time: 168,000 ms”
When a user logs in on src/app/page.tsx, I redirect them to /student/dashboard, which calls my /api/tasks endpoint (passing ?userId=...&page=1&limit=20) to load the user’s tasks. However, my ...
0
votes
0
answers
34
views
Expo cannot connnect to Nodejs server using http calls
So I have been trying to connect my local Node.js server with my Expo app, and for some reason the Expo app, when trying to call my Node.js server, just times out, but if I run the expo app on web, it ...
-1
votes
0
answers
40
views
Securely Updating User's Password / NodeJs - Mongoose
I am trying to create a secure password reseting system by using JWT. While doing pass reset, i was trying to use mongoose. At first i tried to update my user, only using updateOne() mongoose function....
0
votes
0
answers
18
views
The `start_url` is not working for my Progressive Web App built with Node
I am trying to specify the url /api/auth/login?returnTo=%2Fmarket-view as my start_url in my progressive web app but it is still going to the / route on start.
Here is my manifest.json
{
"name&...
0
votes
0
answers
12
views
Unable to use Pouch Db with electron
Node Version: 22
Electron Version: 34.2
PouchDb Version: 9
I create project using this command
yarn create @quick-start/electron my-app
Im trying to use pouch db with electron but Im facing this ...
-1
votes
0
answers
67
views
C:\Program Files\nodejs\node.exe: --r= is not allowed in NODE_OPTIONS
I installed Node.js on a new laptop. I cloned my Next.js project from Github and ran npm install for installing node modules, which ran properly.
To run my local development server, I am running npm ...
1
vote
1
answer
62
views
CORS, transmitting JWT via cookie using HTTPOnly
Problem:
When I send a JWT token via cookies directly to http://localhost:8000/api/profile, it works fine, and I receive user data. However, when I pass the token via a second microservice, I get a ...
0
votes
1
answer
38
views
Checking if something exists
In trying to learn more about REST using node/express. I've noticed that in certain cases, like during sign-up, there are checks to make sure a user with that username / email does not already exist. ...
0
votes
1
answer
47
views
fs.writeFile adds extra brackets to json of key=>values object in node.js
I'm trying to update one JSON file in a for loop called asynchronously. Each time I update the whole file, with 1 object.
This is my very complex code after half a day of research. (I know it's too ...
0
votes
0
answers
14
views
Vite HMR causes HMR_CONFIG_NAME is not defined
Everything works fine on Win10, but not on Win11.
VITE v6.1.1 ready in 236 ms
➜ Local: http://localhost:8444/
➜ press h + enter to show help
Server is running but hot reload is not working ...
0
votes
0
answers
43
views
Unable to connect to Cloud SQL PostgreSQL from Cloud Run using Unix Domain Socket
Environment
Google Cloud Run
Cloud SQL PostgreSQL instance
Node.js 18
TypeORM
Cloud SQL Auth Proxy (running in same container)
Current Setup
My Cloud Run service is configured with:
VPC Connector: ...
0
votes
1
answer
19
views
Cookies are being deleted after a refresh
I've developed a client side with React and backend with Express. When I ran my application locally (on localhost), everything was working fine. 2 days ago deployed both my client and server into ...
3
votes
1
answer
59
views
Is there a way to insert custom data in Obsidian Internal Link result?
I'm developing an Obsidian plugin and want to augment the default internal link suggestions (the ones that appear when I type [[ ) with some custom data. Specifically, I'd like to merge my custom ...
0
votes
0
answers
56
views
How to trigger certain events manually for streamdeck sdk?
I am developing a plugin for the Streamdeck using the elgato streamdeck SDK.
I work on the example project generated by streamdeck create.
I know I can register an action onWillAppear, that will be ...
2
votes
1
answer
86
views
NextJS (15.1.7): ReferenceError: XMLHttpRequest is not defined
ERROR DESCRIPTION
Hey everyone! There is code snippet of my frontend:
'use client';
import Image from "next/image";
import { doSomething } from "./serveractions/do-something";
...
-2
votes
0
answers
64
views
Why isn't my React Native state updating?
I have a method to monitor a characteristic on my BLE device.
import {
BleError,
BleManager,
Device,
Subscription,
} from "react-native-ble-plx";
const bleManager = new BleManager();
...
0
votes
0
answers
88
views
How to send data from react js to a node js server?
So this is my server.js:
const express = require("express");
const multer = require("multer");
const cors = require("cors");
const admin = require("firebase-admin&...
0
votes
0
answers
13
views
keepSessionInfo for passport.js not working for versions 0.7-0.6?
Any calls made to my passport.authenticate() middleware deletes and recreates my req.session object. I need it to stay consistent because it's shared with my socket.io connection. After some digging I'...
0
votes
0
answers
13
views
tplink-cloud-api error code: -23003 App Version is too old
I am trying to use the Kasa tplink-cloud-api in my Node.js Express application. When I try to authenticate, i.e., const tplink = await login(username, password, terminalUUID), I get the error code ...
0
votes
1
answer
44
views
Node.js script hangs after saving documents to MongoDB with Mongoose, despite successful document saves
I have a Node.js script that uses Puppeteer to scrape job vacancy IDs from a website and Mongoose to save those IDs to a MongoDB database. Each vacancy is saved correctly, but the script hangs after ...
0
votes
1
answer
70
views
Find by array of Ids not working with Mongoose aggregate method
I would like to use the aggregate in mongoose to get documents that match the ids in the array.
The array contains mongoose object ids.
It is returning an empty array. Here is my code:
let ...
0
votes
1
answer
46
views
laravel-mix and webpack: command not found
I'm working on resurrecting an older Laravel application. My package.json is non-controversial:
{
"private": true,
"scripts": {
"dev": "npm run development&...
0
votes
0
answers
21
views
Apollo Server, Express.js and Mongoose Deployment on Netlify
everyone I want to deploy my project which is created by express.js, mongoose and apollo server on Netlify and when I run the project by "set NODE_ENV=development&& npm run start:lambda&...
0
votes
2
answers
65
views
My Tailwind CSS does not showing color, boxes or anything. Its just plain
I'm trying to set up a simple Tailwind CSS project locally. Everything works fine on the Tailwind Playground or if I use:
<script src="https://unpkg.com/@tailwindcss/browser@4"></...
-1
votes
1
answer
33
views
Problems running Jekyll and tasks via ESM
I'm encountering strange behavior running a Jekyll build. I kick off the build using npm start from the package.json
package.json
"scripts": {
"start": "node index.mjs&...
0
votes
0
answers
28
views
Generate private key for signing SAML requests and certificate for verification of the signature in typescript
I have an application written in typescript which allows SAML SSO into it. So the application functions as a service provider. SAML requests are sent to Auth0 which is used as an identity provider.
My ...
0
votes
0
answers
16
views
Can't get to setup the windows admin center tool extension environment
I'm trying to following this official tutorial :
Prepare your development environment
Develop a tool extension
However I can't even create a project based on the template, cuz a lint config file is ...
1
vote
1
answer
50
views
Unexpected behaviour of context items
I create a simple function node to demonstrate my problem:
var items=context.get('items');
if (items==undefined) { // first run
node.warn('Create items')
var items={'item1':100}
...
-2
votes
0
answers
26
views
not receiving cookies from backend [duplicate]
I'm working on a React frontend and an Express backend, and I'm trying to send a login request using axios. However, the requisite does not include any cookies, even though I'm using withCredentials: ...
0
votes
0
answers
29
views
webpack-cli TypeError: Cannot read properties of undefined (reading 'getArguments')
I am trying to deploy my application and getting this error. Locally it is working perfectly fine here is the complete stack trace:
2025-02-20T09:20:27.0519522Z > [email protected] build
...
0
votes
0
answers
22
views
chose included files in Nodejs script project in Visual Studio
I have Node.js script(s) using TypeScript which I want to edit and debug using Visual Studio. The problem is that I want Solution Explorer to be the mean for indicating what files to be included in ...
0
votes
0
answers
43
views
NextJS Route handler - wait for worker thread to finish
I have a NextJS application (App Router) which includes a Route Handler which triggers generation of a PDF. This process takes a while, which causes the main thread to stall.
The application runs as ...
-1
votes
0
answers
35
views
How to solve the error message when starting and running the VSCode source code locally?
I followed the official document step by step:
cd vscode
npm install
Ctrl+Shift+B
When starting a project, execute:
.\scripts\code.bat
The error I'm getting is:
E:\projectCode\ai-ide\vscode> .\...
1
vote
1
answer
41
views
Without modifying every route in my app, how can I obtain a list of all the routes that have been matched so far?
Some tangential questions have been asked already. but this seems different - I am asking for a way to nicely instrument Express 5.0, not predict matched routes.
Related: How can I find the originally ...
0
votes
0
answers
27
views
PreFlight problem AWS CloudFront/ABL/NGINX/EC2
The Problem:
getProfile most of times go to PreFlight (but sometimes work right).
Frontend Host: AWS S3/CloudFront and Backend Host: AWS EC2
FRONTEND
client.js
import axios from "axios";
...
12
votes
2
answers
635
views
Why does throwing an error in a not-yet-awaited async function call terminate node.js?
async function delay(ms) {
return new Promise(r=>setTimeout(r,ms))
}
async function fail(ms){
await delay(ms)
throw new Error("kek");
}
async function ok(ms){
await delay(ms)
...
1
vote
1
answer
54
views
Wait-For-Ready in grpc-js
I have been reading about Wait-For-Ready in gRPC and wanted to enable it in my app. I'm using @grpc-js and after digging into the library code (since I couldn't find any documentation about Wait-For-...
0
votes
1
answer
38
views
NX: Angular Environment Variables - process is not defined
I have a NX project with an angular app. I'd like to configure a environment variable so that some value changes depending on the deployment environment. I'm following the NX Recipe documentation for ...
1
vote
1
answer
23
views
"AxiosError: Request failed with status code 400" on Market Order Request
I'm working on a trading bot that connects to Binance Testnet using WebSockets to get ticker updates and Axios to place market orders. However, I'm encountering the following error when trying to ...
0
votes
1
answer
16
views
How to use puppeteer in streamdeck sdk?
I want to create a streamdeck plugin using Streamdeck SDK.
I created the example counter project and it works fine on Windows 11, node 23.8, Streamdeck 6.8.1.
The project is written in typescript and ...
0
votes
0
answers
57
views
Script terminal output on web page
I am building a college project where i wish to run multiple scripts like pinging the IP addresses etc from a web page. I have almost completed but stuck on the part to have a output to be displayed ...
0
votes
0
answers
20
views
How to use pg Pool in node js nest js with typeorm
I already have a Node.js application using NestJS with TypeORM configured. Now, I want to implement a PostgreSQL connection pool using pg Pool for better database connection handling. Is it possible ...
1
vote
1
answer
38
views
Chrome returns null in angular for rest response sized 500MB+
I have angular app use case were when an api endpoint returns more than 500MB data the Observable returns null while api responded successfully with data. Same issue don't happen when data size is ...
2
votes
1
answer
96
views
Error when build NestJS project: util_1.isObject is not a function
I am rebuilding a NestJS project that I could run in 8 months ago, with base on the Dockerfile below
FROM node:alpine as base
WORKDIR /usr/src/app
RUN apk add --no-cache ffmpeg
COPY package*.json ....
0
votes
0
answers
16
views
Does apple wallet supports notification for generic passes on Update?
I am creating generic passes in Nodejs, where update is working fine. Whenever i am updating amount it is updating it on real-time.
But i am not getting notifications for it.
const apn = require(&...