Skip to main content
Filter by
Sorted by
Tagged with
3 votes
2 answers
90 views

How to correctly unref a V8 substring ("sliced string") from its source string

I spent a better (or rather worse) part of today hunting a bug that caused Node.js engine to randomly run out of memory when searching a giant log file line by line by regex. The cause was that I kept ...
Tomáš Zato's user avatar
  • 53.3k
-2 votes
2 answers
92 views

Why am I receiving TypeError: . . . not a function? [closed]

test1.js: const myFunc = () => { return "Hello World!"; }; module.exports = myFunc; test2.js const test2 = require('./test1.js'); console.log(test2.myFunc()); When I run: $ node ...
Crowdpleasr's user avatar
  • 4,028
-4 votes
1 answer
76 views

Cypress on headless mode not able to resolve promises through await calls

I am developing an API testing backend using Cypress with cy.request. I am aware that cy.request natively uses built-in promises (Cypress.Chainable), so there is no need to handle it with JavaScript ...
rangana dilhara's user avatar
2 votes
1 answer
76 views

Can't resolve 'querystring' in old dependency

I have an old React app which I'm trying to run locally, but I encountered some issues regarding querystring and pollyfils. Here are my files: packages.json: { "name": "test-immersion&...
terett's user avatar
  • 463
0 votes
2 answers
65 views

okhttp websocket immediately fails after connection

I've been tryin to get websockets working in my Android app. I am using OKhttp websockets, an apache proxy and a node server. I finally got a connection, but it connects and then within a few seconds ...
Neglected Sanity's user avatar
-4 votes
1 answer
50 views

"Insert record if not present " logic is not working for some request if we hit 100 request per second in Node Express Application

I have made an POC application, where the requeirment is to insert the reocord if ther is no record present in the db. This logic is not working if we hit 100 request per second with same data. For ...
Chinmoy Samanta's user avatar
-4 votes
0 answers
87 views

array?.map (if array is undefined) [closed]

const arr = [{ component_name: 'apple', component_part: [{ part_no: 1, part_name: 'xxx' }, { part_no: 2, part_name: 'yyy' } ] }, { ...
BdPk's user avatar
  • 33
0 votes
2 answers
67 views
+300

Error uploading image to Cloudflare from Buffer with node js and FormData

I am trying to upload an image to Cloudflare from a buffer. I am using the following code: const cloudflare_url = `https://api.cloudflare.com/client/v4/accounts/${process.env.CLOUDFLARE_ACCNT_ID}/...
Cyril Gaillard's user avatar
1 vote
2 answers
34 views

Alternative to 'assert' in Node JS with strict mode

I have a Firebase Functions project that has "type" set to "module" in package.json so that I can use ES6 syntax. Some of the files import data from another json file with a line ...
Matthew Michaud's user avatar
-5 votes
1 answer
77 views

How to read .npz file in Javascript?

I'm trying to follow a tutorial on YT on how to write a basic neural network, but it's written in python. I'm trying to write everything using javascript and I haven't found a way to read the npz file ...
TableTopRug's user avatar
-1 votes
0 answers
87 views

Why does my React app show user details after logout and refresh?

Problem: I am working on a React application that uses context to manage user state. When a user logs out, their details should be removed. However, after logging out and refreshing the page, the user ...
Ujjwal Gaihre's user avatar
-3 votes
1 answer
47 views

Error Handling Environment Variables Natively in Node.jsv22 Within a Container

I am trying to work with .env files natively, as starting from Node.jsv20 (I am currently using version v22.14.0), it is no longer necessary to install libraries like dotenv to manage environment ...
Jorge Leonardo's user avatar
0 votes
1 answer
55 views

Why running laravel example demo node invalid nodejs error?

I try to install external laravel 11 example demo on my local ubuntu 22.04 and got next error : ExampleDemo$ npm install npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '...
Petro Gromovo's user avatar
0 votes
1 answer
58 views

Puppeteer executing the first click action in an array immediately, regardless of delay

I'm facing a seriously weird issue with puppeteer, running on Chrome. I have an array of click actions I want to execute on a webpage, which has a pdf.js based slideshow. Each action consists of ...
Juhana Kuparinen's user avatar
1 vote
1 answer
42 views

How to Set NEXT_PUBLIC_* Environment Variables After Next.js Build in Docker?

I'm trying to implement a "build once, deploy everywhere" approach for my Next.js application. I've managed to configure environment variables for server-side components, but I'm struggling ...
Fabio Piunti's user avatar
  • 1,094
1 vote
1 answer
51 views

NextJS 15 Build Error occurred prerendering page "/404"

when running NODE_ENV=developement npm run build in nextjs project, there is the following error, Error: should not be import outside of pages/_document. Read more: https://nextjs.org/docs/messages/...
fauzancodes's user avatar
0 votes
1 answer
36 views

Download 1 to many excel files from Angular Api into zip folder

I've currently got a program that works in downloading a singular file from backend, constructing it into a blob and converting it to an excel. As seen below. let filename = 'download' + this....
JustThatGuy93's user avatar
-4 votes
0 answers
50 views

Why isn't apache server letting my Javascript CSS media and many other files through [closed]

I tried deploying my sveltekit app through a reverse_proxy using apache , it worked but all the styles are gone and functionality Image 1 Showing Responses Image 2 Showing APPLICATION I tried this ...
Em Pax's user avatar
  • 1
-3 votes
0 answers
45 views

React app doesn't load if the page is refreshed? [duplicate]

I am developing a webbapplication using a MERN stack with React being the frontend. The App.js returns a React Router: return ( <div className="App"> <Router> ...
user28751094's user avatar
0 votes
1 answer
48 views

Await causing aws Lambda to timeout

I have some async code in my AWS Lambda function and no matter what async code is running it never resolves. It just causes the Lambda to timeout. export const handler: Handler = async (event) => { ...
Ethan's user avatar
  • 1,686
0 votes
1 answer
42 views

TypeError: connectDB.query is not a function

import connectDB from '../db/index.js'; export const List = (req, res) => { const { Line_No } = req.params; if (!Line_No) { return res.status(400).json({ error: "Line_No is required&...
Thisal Thewmika's user avatar
-3 votes
0 answers
50 views

Why am I getting error: is not a function? [duplicate]

I have: /services/db.js import mysql from "../node_modules/mysql2/promise.js"; import config from "./config.js"; async function query(sql, params) { const connection = await ...
Crowdpleasr's user avatar
  • 4,028
1 vote
0 answers
40 views

"Error: packages field is not an array when using pnpm-workspace.yaml in a monorepo setup"

I'm working with a PNPM monorepo setup, and everything was working fine when I was using pnpm.yaml, but after switching to pnpm-workspace.yaml, I’m encountering the following error: ERROR  packages ...
Naga mani kanta manam's user avatar
1 vote
1 answer
41 views

Dynamic table, display nested property in TableCell from array of objects

I have an array tracks of type Track[]. I need to display them in a HeroUI/NextUI table dynamically. The example uses getKeyValue, which is a function in the HeroUI library, to dynamically retrieve ...
tenderporkk's user avatar
1 vote
1 answer
33 views

Why it doesn't redirect to the login page if the user is not logged in?

I am implementing protected routes and the code successfully generates the status 500 server error if the user is not logged in. now I want to redirect a user to the login page if the user is not ...
J_Max's user avatar
  • 13
-5 votes
0 answers
38 views

How can I be dialing USSD code in Nodejs? [closed]

I want to be dialing ussd codes through my nodejs app, but it all not working. I just need a way or a free API that cann be dialing ussd code on a particular sim card, and returns response back. I ...
Joshua Ola's user avatar
0 votes
0 answers
61 views

AWS Serverless Elasticache Valkey

Today I created Serverless Elasticache Valkey and tried to connect using code which I got from Connect to your cache section. const {Redis} = require("ioredis"); const client = new Redis....
Dima jangveladze's user avatar
-4 votes
0 answers
37 views

Authorizing against Spotify with Node

I've been trying to get a token from the Spotify API using NodeJs (within the Nuxt). I keep getting a 400 bad request response though. I've asked both ChatGPT and Claude but they couldn't help me ...
Rik Verbeek's user avatar
0 votes
1 answer
63 views

Getting Error code 404 from Phone Pe PG Integration via Web Flow in Express |Node JS

I am integrating Phone Pe Payment Gateway on my Web Application. Getting response as 404 from Phone Pe API {"success":false,"code":"404"} On the Backend I have done the ...
Aftab Ahmed's user avatar
0 votes
1 answer
44 views

Download public "Shared with Anyone" files from google drive folder via Node.js and googleapis

I am trying to read a list of files in a publicly shared Google Drive file. I am trying to identify a particular csv file by name and download it daily as the folder maintainer creates a new version ...
Patrick Conrad's user avatar
-2 votes
0 answers
42 views

npm not recognizing node? despite path being correct

I just installed node (LTS) and let chocolatey install, just rebooted my PC, and tried making a project but npm wont run node?, i checked everything, the paths, reinstalled node several times, ...
Alberto Huarastaca's user avatar
1 vote
1 answer
38 views

How to set DNS server for a single axios get request?

I know I can set the DNS servers in node dns.setServers([ '4.4.4.4', '[2001:4860:4860::8888]', ]); But this is set globally and I'm developing a module (dependency) and I don't want to affect ...
João Pimentel Ferreira's user avatar
0 votes
1 answer
47 views

How do Firebase v1 functions access secrets?

I have been moving a set of Firebase functions to version 2 and I can access secrets in OnCall functions using this syntax: export const fn = onCall({ secrets: getSecrets() }, () => ... The ...
jmc42's user avatar
  • 424
-1 votes
1 answer
51 views

Console.log result shows ${field} instead of the actual string [closed]

In the code below, I run: node test-update.js and I'm expecting output in the console such as: . . . Field: "name" Data: "John Doe" Data: "Jane Doe" . . . but instead ...
Crowdpleasr's user avatar
  • 4,028
0 votes
0 answers
38 views

Firebase v2 Database Triggers not able access parent data from within trigger

It seems as if my promise to get parent data from within my Realtime Database trigger doesn't resolve. Realtime Database Structure: { matches: { {matchId}: { startAt: number, endAt: ...
steven oyinlola's user avatar
-1 votes
0 answers
39 views

A problem with React in Vercel Serverless Functions - SyntaxError: Cannot use import statement outside a module

UPD: Resolved. Yesterday I decided to create such a program that returns the text from my portfolio to the terminal when curl -L okinea.dev/cli is requested It looks like this: My program works ...
Okinea Dev's user avatar
0 votes
1 answer
25 views

How can I "inline" typescript dependencies?

I have a project that depends on 3 external dependencies I'd like to inline those in my project such that their code is under a single source tree and I can remove them from package.json Is there a ...
JF4's user avatar
  • 488
-2 votes
0 answers
38 views

Trying to install ANY JavaScript Module/Package with PNPM ended up Failing

So, recently, i just install NodeJS on my system, i switch to PNPM because NPM is too slow, so i install it using the command: npm i -g pnpm then, i run pnpm -v, it says: 10.5.2, but, problem arise ...
GWLT's user avatar
  • 1
2 votes
1 answer
63 views

Claude Code failing with Cryptic message - Error: write EPIPE

In short: although tool was working perfectly, it started failing. Full output: ➜ claude Error: write EPIPE at afterWriteDispatched (node:internal/stream_base_commons:159:15) at writeGeneric (...
Dimitrios Mistriotis's user avatar
2 votes
1 answer
37 views

Why can't I swap with some SPL tokens when I use Jupiter v6 Swap API?

I am gonna buy and sell SPL tokens using Jupiter Quote API and Swap API. My code works with some tokens but I failed with some tokens. However, I can see lots of holders for those tokens on Solcan. I ...
Oleksii Vasylets's user avatar
0 votes
0 answers
37 views

Error: The default export is not a React Component in "/page"

I am getting this error after I moved my page.tsx from app directory to the group route that I created in the same app directory. The reason why I moved this home page to group route because I want to ...
Marccodes's user avatar
0 votes
1 answer
24 views

All the services return as a undefined in Global Interceptor in NEST JS

I am trying to create a global interceptor in NestJS and call a service inside it. I have followed all the documented steps, but all the services used within the interceptor are still returning as ...
Zenixo's user avatar
  • 877
1 vote
1 answer
28 views

How to display a web browser instance in my next js web application?

In my web application, the user can view the website that the user enters in the text input, and then the url (webpage) is rendered in an iframe on the right inside the web application itself. The ...
Bharath Lakkoju's user avatar
-1 votes
0 answers
46 views

Data not written properly on buffer [closed]

I am working on ETI (Enhanced Trading Interface) using nodejs. In that there is session logon request with template ID 10000. As per documentation the request header should not be encrypted and ...
Jignesh Patel's user avatar
-3 votes
0 answers
37 views

Why do I get an error when I enter the command "Copilot setup" in neovim? [closed]

I want to use Copilot in qt creator,so I follow these steps: download node.js(v22.14.0) and npm(v10.9.2) download neovim(v0.10.4) enter: git clone https://github.com/github/copilot.vim.git $HOME/...
何坤良's user avatar
0 votes
2 answers
40 views

How to Optimize Docker Multi-Stage Build for Faster node_modules Copy?

I'm trying to optimize my Docker multi-stage build for a Node.js application, specifically focusing on reducing the time taken to copy node_modules. Currently, the step that copies node_modules from ...
Bako's user avatar
  • 60
1 vote
1 answer
38 views

is it possible to check whether the user-given foreignFieldId (req.body.foreignFieldId ) exists or not before calling db.create(req.body) in MongoDB

Product Schema: const productSchema = new mongoose.Schema({ name: { type: String, required: true }, price: { type: Number, required: true }, addedBy: { type: mongoose.Types.ObjectId, ref: '...
Avijit Sengupta's user avatar
-2 votes
0 answers
32 views

Automatic response header writing in nodeJS [closed]

I'm having a problem with a controller (create), each db call made using mongoose (look at the service) will automatically write to response headers with no manual control over it, that's leading to ...
Bouhadda Mohammed's user avatar
0 votes
0 answers
34 views
+100

Firebase Dynamic Links losing app parameters in Capacitor Browser redirect chain on Heroku

I have a weird issue with Firebase Dynamic Links in my Capacitor app. When using deep links to authenticate users via SAML, it looks to be losing specific URL parameters but only in my staging ...
J.Do's user avatar
  • 201
0 votes
1 answer
51 views

Passing the username through an iframe without passing it in the url in extjs

Currently we have an extjs application where we are calling the /login API through an Iframe by passing the username as /login?username=YWRtaW5AZWZmaXNlci5jbzZTZzMTg= and reading this in the ...
Just another object's user avatar