473,553
questions
0
votes
0
answers
12
views
Unable to Establish Connection from Node.js Application to Remote MySQL Database on NameCheap via SSH Tunnel
I'm having trouble setting up a connection from my Node.js application to a remote MySQL database hosted on NameCheap. I've tried multiple approaches, but nothing seems to work.
What I've tried so ...
0
votes
0
answers
12
views
In NestJS, service is invalid when injected to another service?
I`d like to develop a rest app by NestJS and MikroOrm. And I prefer to use clean architecture to manage code, so a lot of modules are abstracted and a module need to be import to another module.
What ...
0
votes
0
answers
6
views
Unhandled 'error' event with self-signed TLS certificate on node:http2 and wget
I created a simple HTTPS server with node:http2 package and self-signed certificate. This is a code for this app server:
import {createSecureServer} from 'node:http2';
import {readFileSync} from 'node:...
0
votes
0
answers
22
views
FATAL ERROR: JavaScript heap out of memory only when deployed in Azure container apps
I have deployed the same (no code change) Node.js application in both Docker containers and Azure Container Apps. I've noticed a discrepancy in memory usage between the two environments.
In Azure ...
-1
votes
0
answers
15
views
Error "updates.map is not a function" when modifying cells of tables retrieved from BigQuery via an API
Here's the revised version of your question with the HTML structure and server details included:
Title:
Error "updates.map is not a function" when modifying cells of tables retrieved from ...
-1
votes
1
answer
23
views
'npm run dev' result: [Error: ENOENT: no such file or directory, open '/ddev/project-name/node_modules/@vue/apollo-composable/src/useApolloClient.ts']
I took over a Craft CMS project, which I successfully upgraded to the latest version of Craft 5.
When I run the command needed to build the JS and CSS files
npm run dev
I get the following error:
...
1
vote
0
answers
11
views
Nodemon Crashes with 'bad ELF magic' Error on Termux in Android
I'm using Termux on my Android phone to run a simple Node.js server with nodemon. My server script (index.js) is written in JavaScript and should work fine, but when I run it with nodemon, I get the ...
0
votes
0
answers
15
views
Correct way to have several async processes in nodejs append to the same file
Is there a correct / better approach to using a file descriptor that several process running asynchronously can write to? e.g.:
const allTheAsyncJobs = []
const fileDescriptor = fs.openSync(pathToFile,...
0
votes
0
answers
22
views
Error: querySrv EREFUSED _mongodb._tcp.cluster0.vzygb.mongodb.net while connecting to mongodb
I've tried everything using chatgpt and configuring it again. Creating a new project and then creating a cluster and then doing all the process again.
But this error seems to be stuck there. what is ...
0
votes
0
answers
8
views
Upgrade to node18, and Server was keep failing with ECONNRESET
Has anyone faced the same issue, when I upgraded our web server to use node 18. The server kept failing to handle incoming requests with
code: ECONNRESET
See the full error stack below:
"err&...
0
votes
0
answers
14
views
docker "copy . ." error Cannot copy to non-directory
When I run> docker build -t test .
Getting this response:
=> ERROR [ 8/10] COPY . . ...
0
votes
0
answers
6
views
Reaction Collector not collecting reactions in DMs
I am using Discordjs v14.15.3. The following script is supposed to send an invitation via DM to all members who have opted into our coffee chats to confirm that they are interested in participating ...
0
votes
0
answers
9
views
405 Error or 401 Error (sometimes) on Stripe Endpoint with Next.js, Vercel, and PM2: Unable to Create Checkout Session
I'm integrating Stripe into my Next.js application deployed on Vercel. The goal is to create a checkout session through a POST request to the /api/stripe/create-checkout-session endpoint. However, I'm ...
0
votes
1
answer
29
views
Transform crypt() from PHP to Node.js
I'm having a problem converting crypt() from PHP to Node.js
I have a database with the reg_users table where I have columns like username and password.
In PHP, it's very simple to encrypt the password ...
-2
votes
1
answer
53
views
I'm stuck for 5 days on solving an issue with node.js
I'm taking the web application course and have been building my own website on the side.
I'm trying to have items.js grab contents from the posts(.html) save them in an object, and then app.js will ...
0
votes
0
answers
18
views
Why aren't SSE messages automatically rendering in my app's live feed?
I'm building a CRM application that uses Server-Sent Events to receive real-time updates for new messages (pretty simplistic chat UI). While the messages update when I click on a user in the ...
-1
votes
0
answers
21
views
NodeJS: Mixed Content, content must be server over HTTPS instead of HTTP
NodeJS App running on frontend port:3000, backend port: 5000 in same Machine in Ubuntu (Linux).
My Domain is SSL Configured. When frontend routing request to backend, getting mixed content error.
Snap:...
0
votes
0
answers
9
views
Mystery Bug Fix in Electron v26 and Mac App Store build
I have an Electron app that uses a native add-on to access the Photos library on macOS. This feature didn't work in the MAS (Mac App Store) build when the sandbox is enabled.
Here is what I observed:
...
0
votes
1
answer
19
views
Should this HTTP contract class be considered a repository, service, or just an HTTP client?
I'm looking for some advice or best practices for a pattern we're discussing internally.
We have a class (example below) that defines an HTTP contract to interact with an external REST API. The class ...
0
votes
0
answers
9
views
Problems publishing to a private npm registry (CodeArtifacts) using Lerna
I'm looking to move from public npm registry to private npm registry hosted in AWS.
The cmd that we are using to publish to a private registry is
lerna publish --conventional-commits --conventional-...
0
votes
0
answers
11
views
Node.JS - Why is the cookies / session missing sometimes after the payment gateway
I am doing a webiste using Node.JS and it including a payment features where it will post form submission using javascript from ejs file, and then being redirect to the payment gateway.After the ...
0
votes
0
answers
22
views
Request fails when sending from fetch but succeeds in api client
I am sending the following fetch request:
try {
const response = await fetch(`http://localhost:3000/fs`, {
headers: {
Accept: "*/*",
method: "readFile&...
-1
votes
0
answers
13
views
I was using VS code and node js for a while now and after a few weeks my keyboard started glitching , any solution?
When I deleted Node.js and VS Code, it started working normally
and when I downloaded VS Code and Node.js again, the glitching came back.
Keyboard even stopped working at times.
Is anyone facing this ?...
-1
votes
0
answers
22
views
Getting errros on js script tag on a ejs page [closed]
let glassRestrictions = <%- JSON.stringify(windowSystem.glassRestrictions.map(glass => ({
type: glass.type,
width: glass.width,
height: glass.height,
positivePressure: glass....
0
votes
0
answers
15
views
Persistent Vulnerabilities in node_modules Despite Multiple Fix Attempts
I've been working on a project in React, and after installing my dependencies using npm install, I encountered a significant number of vulnerabilities reported in my node_modules folder.
Specifically, ...
1
vote
1
answer
38
views
Is the method subscribe in angular 17 is not working
export class HomeComponent implements OnInit {
data: any;
constructor(private apiService: ApiService) { }
ngOnInit(): void {
// Substitua 'your-endpoint' pelo seu endpoint real
this....
0
votes
2
answers
23
views
not able to connect flutter app with node server
iam trying to connect my flutter app to a node server the flutter application has a registration screen that accepts username,password and email from users and it should be reflected to mongodb using ...
0
votes
0
answers
15
views
Issue with storing a text value in React on client side to then retrieving it on server side
I have an app that runs on http://localhost:3000/
In first page.tsx a user selects a category and is redirected to second page.tsx.
I want to store the selected category name here or in second page....
0
votes
1
answer
14
views
beforeSoftRemove hook not updating database entry using Nest.js and TypeORM
I want to implement a solution in Nest.js and TypeORM application that every record that is getting created should have createdById, updatedById and deletedById against their actions. Let me share the ...
0
votes
1
answer
18
views
Firestore error "User document does not exist"
I'm working on a project similar to Linktree and have implemented Firebase for authentication and Firestore for the database. The authentication system is functioning correctly, and user data is being ...
-2
votes
0
answers
14
views
NGINX blocks url paths [closed]
I have a server running nginx. It was configured by default with the service I purchased.
I face an "500 internal server error" whenever I open the website link like 'website.com/page1' or '...
0
votes
0
answers
21
views
How can I mock up the express-validator withDefaults function using jest?
I am trying to unit test my validation segment which uses express-validator.
This is the start of the segment:
const errorMsgs = require('../lib/error-messages');
const validationResults = ...
0
votes
0
answers
8
views
Can Not Receive Offered Verifiable Credential From Issuer - credo-ts
To issue a verifiable credential to a specific holder, I send a credential offer to the holder that is connected beforehand by DIDComm but the holder cannot receive/accept the credential offer.
I use ...
0
votes
0
answers
29
views
Nodejs mongodb insert with `_id`, but `_id` becomes empty object
I'm inserting some records with _id = new ObjectId('a string with 24 length') to a collection in mongo with nodejs.
But the result _id in mongo becomes an empty object: {}, resulting in failure in ...
0
votes
1
answer
18
views
Mock being ignored, jest node
I'm trying mock a database with this test but the mock seems to be ignored. I can't think of a reason this could be?
import { jest } from '@jest/globals';
jest.mock('../database', () => ({
...
0
votes
0
answers
9
views
Is there any node.js implementation available for Reverse Soundex & Reverse NYSIIS?
There are Phonetic Algorithms like "Reverse Soundex" ,"Reverse Nysiis" . We are not able to find anything about its implementation in Node Package Manager website (npjms.com). Can ...
0
votes
1
answer
27
views
Issues with Emitting Events to Socket.IO Server on Different URLs and JSON Data Conversion
I am working on a Node.js backend project using Socket.IO and am facing two issues when trying to interact with the Socket.IO endpoints via Postman:
1. Connection and Event Emission Issue on Different ...
-1
votes
0
answers
21
views
how to prevent duplicate keys into database with mongodb and expressjs
i am working a crude project with mongodb expressjs and pug(formerly knone as jade) i am stuck on preventing duplicate keys both on Front-end and backend.
this is what i did....
let mongoose = require(...
-1
votes
3
answers
44
views
MongoDB ECCONREFUSED when connecting to MongoDB Compass
I am trying to learn Node.JS from scratch. I am trying to connect index.js to MongoDB compass when I get the error:
MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
at ...
0
votes
0
answers
29
views
Is splitting a large JSON on Redis is more efficient than storing a big one? [closed]
I'm building a Node.js server that handles large file uploads to S3 using multipart uploads. To ensure consistency across multiple Kubernetes pods, I'm storing chunk upload data in a large JSON object ...
-1
votes
0
answers
13
views
Is it node js express or nestJs fastify better to use concurrency, scalling, performance, large data fetching and saving side? [closed]
give me advantages and disadvantages with the result previously used POC's mainly i'm facing issue concurrency and scalabitity issue with large number of data. so i need to select proper framework to ...
-2
votes
0
answers
31
views
HOW to improve this node express server code and its code ? and how to improve the recurring notification api [closed]
Title: Why is my API endpoint not pushing FCM notifications with schedule?
Body:
I'm working on a Node.js/Express API endpoint to schedule push notifications using Firebase Cloud Messaging (FCM). ...
0
votes
0
answers
19
views
Permission error (EACCES) with npm after password change on macOS, unable to use sudo command
I recently changed the password for my admin account in Users & Groups on macOS and tried to install React, but I encountered the following error:
npm ERR! code EACCES
npm ERR! syscall open
npm ...
0
votes
0
answers
20
views
Error [ERR_INSPECTOR_NOT_AVAILABLE]: Inspector is not available, while using vercel/pkg and pm2 in nodejs
I have a NodeJS CLI application built using commander, I am using vercel's pkg to create executables.
Now, I starting a localserver using express on a particular command like this:-
program
....
-2
votes
1
answer
25
views
Make npm flatten all deps like yarn
We use npm at work for most of our projects, except for one private module where we use yarn to globally manage the versions for dependencies in other projects, simply because npm just doesn't flatten ...
0
votes
0
answers
13
views
Can't set cookies with passport google oauth
I am using Passport's GoogleAuth20 to login. I can login successfully but in callback function can't set any cookies.
This is my callback function after authentication:
exports.googleCallback = (req, ...
-1
votes
0
answers
29
views
Uncaught runtime errors in React.js [closed]
ERROR
Network Error
AxiosError: Network Error
at XMLHttpRequest.handleError (http://localhost:3000/static/js/bundle.js:52874:14)
at Axios.request (http://localhost:3000/static/js/bundle.js:53315:41)
...
0
votes
0
answers
17
views
Inconsistent indentation in pug template error
in pug template i face this error ...
Error: C:\nafeesData\complete web development course\Dance Website\views\home.pug:22:1
20| li #[a(href="/") Info]
21|
22| section#...
1
vote
1
answer
32
views
Separating routes into different modules
I've been putting my all routes into one server.js file, after a while i realised there is about 1000 lines in one file and it is hard to manage it. The question is there a simple way to seperate ...
0
votes
1
answer
24
views
I want automatically to execute the cronjob in node.js at exactly last day of the month
const sendReport = new CronJob(
"0 0 28-31 * *",
async function () {
try {
console.log("Running a task every minute in sending Reports");
await sendMail();...