471,022 questions
Best practices
0
votes
4
replies
43
views
Which is a more viable option for a Node.js backend — TypeScript or JavaScript?
I’m setting up a new Node.js backend project and trying to decide whether to go with TypeScript (TS) or stick with JavaScript (JS).
I’m aware that TypeScript offers type safety and better tooling, ...
0
votes
0
answers
21
views
Fetching all the issues of a project using Jira APIs
I need to fetch all the issues present in the project using the Jira APIs with some specific fields. Is there a way to do so without hitting the rate limit? It should be Hierarchical up to level 3 [...
0
votes
0
answers
35
views
Error when wrapping import function in nodejs
I have the following code:
src/main.js
const importModule = async (moduleName) => {
const mod = await import(moduleName);
return mod;
};
const fs1 = await import("fs");
const fs2 = ...
-1
votes
0
answers
20
views
TypeError: (0 , import_crypto.randomFillSync) is not a function from compiled package
I have a monorepo built with turborepo and I published my private package and in vs code there is no errors but when I install that package in an external app and use a component from within it, I ...
1
vote
0
answers
23
views
Pixelit JS Library - Incorrect Size
I have already submitted a question regarding Pixelit, see this question for background info.
Long story short, I'm making a Discord bot as a learning project and I am just trying to use Pixelit, an ...
0
votes
1
answer
34
views
Why window.close() from renderer process doesn't trigger the close event in Electron's main process?
I'm building an Electron application and trying to close a window from the renderer process using window.close(). However, the close event listener I've registered in the main process isn't being ...
3
votes
1
answer
83
views
Getting SQLite Syntax Error when saving model in Sequelize.js v7
So, I'm trying to learn full stack by making a list app, and I'm using
Sequelize.js for the database. So far I've got User and List models. I
recently switched to Sequelize v7.0.0-alpha.47. I can't ...
1
vote
2
answers
62
views
How to declare type for app.locals.something?
It's the same question as How do I extend the typings of Express.Application to give typings for app.locals but the suggested solution doesn't work for me.
I have server.ts :
const express = require('...
0
votes
0
answers
17
views
Occasional “NoSuchKey” from S3 right after successful PUT using pre-signed URL (same region)
I’m facing an intermittent issue when uploading files to Amazon S3 from an Android app using a pre-signed PUT URL.
Setup:
Android app uploads directly to S3 via a pre-signed PUT URL.
After receiving ...
1
vote
0
answers
48
views
When I try to run npm I get a crypto binding error
Whenever I try to use npm I get an error:
npm ERR! Error: crypto binding not found.
npm ERR! Please build node with openssl
I have completely uninstalled Node.js and npm, deleted their directories ...
-1
votes
0
answers
35
views
npm creates different package-lock.json on different systems (peer dependencies)
When using npm to install dependencies, my system produces a strange behaviour concerning peer dependencies.
A package referenced in the app (let's call it xyz) has a peer dependency to Vite and ...
0
votes
0
answers
60
views
Decompress .zstd file using typescript
I'm trying to programmatically decompress a .zst file using typescript. This is the code I am using:
import { createReadStream, createWriteStream } from 'node:fs';
import { createZstdDecompress } from ...
0
votes
0
answers
27
views
Why am I getting a decode error when calling a function in my Hardhat smart contract?
I’m building a simple Voting DApp using Solidity and Hardhat.
The contract deploys successfully, and I can start and end voting without issues.
However, when I try to call the getWinner() function ...
0
votes
0
answers
30
views
How to efficiently validate large datasets for missing and inconsistent values in Node.js? [closed]
I’m working on a data quality validation pipeline for large CSV/JSON datasets (10M+ records) using Node.js.
I need to detect and report issues like:
Missing values
Outliers
Type mismatches (e.g., ...
3
votes
1
answer
41
views
Query not printed as expected
exports.getAllProducts = async (req, res) => {
try {
console.log(req.query);
const queryObj = { ...req.query };
const excludedFilters = ["page", "limit", "...
3
votes
1
answer
67
views
How do I use Discord.js and Node.js to send an image?
Preface: I truly don't have a clue about anything related to node.js, this is a learning project for me. I do know some Javascript.
I followed this youtube tutorial to begin a node.js and discord.js ...
-4
votes
0
answers
36
views
Is there a way to add auto-transaction of crypto once wallet a Dapp connects to wallet? [closed]
I created a Dapp crypto website. I was able to connect to wallet and fetch wallet address successfully. But I tried to include some logics in other that once a wallet connects to the Dapp, it then ...
1
vote
1
answer
79
views
PostgreSQL UUID query issue
I have the following in a TS script that I'm running with the npm tsx package (slicing to 1 item to make it shorter, but same error when using full array):
console.log(psql(`SELECT c.id lead_uuid, ...
-3
votes
0
answers
71
views
Should I keep the README alsomst empty in npm packages to avoid the increasing of "Unpacked Size"? [closed]
There are people who cares about npm package size.
The large package size creates a bad impression.
However, the package size is not only the code - it also the README.md.
As default, the README is ...
-4
votes
0
answers
32
views
QZ Tray HTTPS Localhost – Invalid Certificate Error Even After Providing Certificates [closed]
I'm working on a local React app that needs to connect to QZ Tray over HTTPS. I want the app to run locally at https://192.168.1.35:3010, and I've tried providing all the necessary certificates in ...
-1
votes
0
answers
48
views
Mocking native node: libraries in CJS and TypeScript
I am trying to mock some native node: libraries with Node's native node:test mocking on a CJS TypeScript project. Sometimes I have success when mocking without the node: prefix, other times not.
...
-1
votes
0
answers
28
views
Mongoose .find() method returning one document only [closed]
I am using mongoose. find method just like normal but after attaching some filters to it, it returns only one result which is the oldest (It doesn't matter I will explain in a second). And some of ...
-1
votes
1
answer
56
views
Can't register DMX driver [closed]
I'm trying to set up a DMX driver using the 'dmx' library but I get this error when I run my code.
TypeError: this.drivers[driver] is not a constructor
Here is my code:
const DMX = require('dmx');
...
0
votes
0
answers
34
views
Custom error objects for Mongoose schema paths
Take the following Mongoose schema.
const userSchema = mongoose.Schema({
username: {
type: String,
required: true,
unique: true,
minLength: 3
},
name: ...
-2
votes
1
answer
45
views
Receiving object undefined on backend in socket.io [closed]
I am using ReactJS along with socket.io for building an application.
App.jsx
import { useState } from "react"
import io from "socket.io-client"
const socket = io.connect(...
Tooling
0
votes
0
replies
36
views
Reuse "node_modules" from pre-built dev container
I'm trying to build a pre-built dev container (see here).
Among others, the app uses some Node.js packages. To speed up the dev container performance, I'd like to cache them. For this, I'm running npm ...
-3
votes
0
answers
33
views
When using docker node:alpine build node_modules installs in /usr/local/lib
Why was /usr/local/lib the defaut local packages destination directory in NodeJS docker image ?
FROM node:24-alpine
WORKDIR app/
COPY package.json yarn.lock ./
RUN corepack enable \
&& ...
2
votes
0
answers
64
views
System cache constantly grows when stress testing backend app
I've been stress testing my .NET application that uses PostgreSQL to find memory leaks. The app is very stable memory-wise — memory usage only depends on the number of concurrent connections.
However, ...
0
votes
0
answers
29
views
Failed to deploy puppeteer chromium in Render
I used puppeteer in my Node.js project and wanted to deploy it to Render as Docker image but the puppeteer chromium browser fails to launch in Render and gives me the error trace below. The app runs ...
0
votes
0
answers
42
views
Next.js 15 Middleware: "Cannot find the middleware module" error with NextAuth.js
I'm implementing authentication middleware with NextAuth.js in Next.js 15.3.2 using the App Router. The middleware compiles successfully but throws a runtime error when trying to access protected ...
1
vote
0
answers
23
views
Package not found error in Saucectl command line execution
I am trying to set up Saucectl in my project and I have done the entire setup which includes saucectl config files and env variables.
I verified all the sauce documented Packages option, Dependency ...
2
votes
1
answer
69
views
Browser stops requesting images from Node Server
I’m running a simple test server to test out a few concepts. For testing purposes, I have a directory with a structure like this:
data/
index.html
images/
image1.png
image2.png
...
2
votes
0
answers
72
views
Every day, the first and only the first backend call of my Node/Express app in production fails with ERR_CONNECTION_RESET or ERR_CONNECTION_REFUSED?
I have a basic MERN app in production with a login system that always runs into either an ERR_CONNECTION_RESET or an ERR_CONNECTION_REFUSED AxiosError when first attempting to login after what it ...
0
votes
2
answers
974
views
Error: "PrismaConfigEnvError: Missing required environment variable: DATABASE_URL"
I’m working on a Next.js + TypeScript project with a MySQL database using Prisma.
I set up my configuration in prisma.config.ts like this:
import { defineConfig, env } from "prisma/config";
...
0
votes
0
answers
107
views
Puppeteer occasionally generating blank PDF [closed]
I am running puppeteer to generate some PDF forms for my service in node and occassionaly (1/100 cases) puppeteer is generating a blank PDF (of size 88 bytes) with 1 completely white page.
I am using ...
0
votes
0
answers
50
views
WRTC connection failure on sending binary
I am working on an electron pet project of mine to send files over local network.
For the actual sending part I choose to use wrtc via Simple-Peer, and it's on a backend(maybe weird I know) so I ...
-2
votes
0
answers
79
views
How to make an online TypeScript app repository on GitHub? [closed]
I have been trying for a bit of time to make a TypeScript + React app online, for a project, but I can't get the repository set up on GitHub. I now also have Node.js and want to know how I can set up ...
0
votes
0
answers
25
views
How can I disable the page translation popup in Microsoft Edge when using Puppeteer?
When I open a local website using Puppeteer and Microsoft Edge I get a "Translate page from [language]" popup like seen in the screenshot below.
I currently launch Microsoft Edge using the ...
0
votes
0
answers
36
views
Unable to list accessible customers with Google Ads API (test acc)
I'm trying to access google ads accounts in js.
Here's how I do the callback mechanism:
...
const { clientId, userId } = JSON.parse(state);
const oauth2Client = new google.auth....
-5
votes
0
answers
41
views
I need a way to fix a backend issue in Node.js [closed]
There’s something strange: my backend is built with Node.js and MongoDB. When I add a new API, everything is correct — it runs fine with npm run dev. But after I stop it with Ctrl + C, restart it, and ...
1
vote
0
answers
20
views
Squarespace live server installation command failed (Windows 11)
I've been trying to install the local Squarespace server using npm and it's been a mess.
My co-workers who use Macs don't have these problems, but the other person with Windows 11 does.
When I run npm ...
-5
votes
0
answers
88
views
How do I specify which version of nodejs I want? [closed]
I want to download the latest LTS version of nodejs on my Windows 11 machine but I'm confused by the layout of the download page since the last time I installed nodejs (two or three years ago).
It now ...
2
votes
1
answer
84
views
How to add data from a client-side input field to my array websites[name] and then display it in html document
How to add data from an input field in the browser to my array websites[name], and then display it in a html paragraph?
server.js
import express from "express"
import { websites } from "...
0
votes
0
answers
89
views
How to publish repository to npm using yarn
I did a fork of this repository and I changed in each package.json the name from @bigbluebutton/editor to @piszczj/editor. Then I've run yarn install and then yarn workspace @piszczj/utils npm publish ...
Advice
0
votes
0
replies
40
views
How can I efficiently run a RAG pipeline fully in Node.js using OpenAI embeddings and FAISS without relying on Python?
I am working with a small Retrieval-Augmented Generation (RAG) setup and I want to run the entire pipeline purely in Node.js without using any Python-based services.
Workflow i am going to follow :
...
0
votes
0
answers
55
views
Server path alias not recognized when importing files between server and client
I have 3 files:
// server/src/entities/NewPost.ts
export interface NewPost {
title: string;
content: string;
}
// server/src/api/posts/create.ts
import { NewPost } from '@/entities/NewPost';
...
1
vote
0
answers
43
views
Stop Rollupjs embedding absolute path inside js dist map file
I'm trying to update my GitHub action to use latest version of "base" action. All is looking fine but one PR check fails on checking if /dist directory was updated.
It finds some changes in /...
-4
votes
0
answers
82
views
How to fetch real exam, scholarship, and hackathon info? [closed]
I’m working on a project where I need to fetch real and updated information related to exams, scholarships, and hackathons such as important dates, application links, and basic event details.
I tried ...
0
votes
1
answer
74
views
How can I strongly type Server-Sent Event payloads shared between a Node.js backend and a React frontend using TypeScript? [closed]
I'm building a small dashboard in React (18.x) that subscribes to a stream of updates from my Node.js (Express 4.x) backend via Server‑Sent Events (SSE). Both the server and client are written in ...
-3
votes
0
answers
44
views
Got these errors in GitHub Actions [closed]
I would like to build my frontend React app and my backend Node.js app with GitHub Actions but got these errors.
sh: 1: react-scripts: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR!...