Questions tagged [node.js]

Node.js is an event-based, non-blocking, asynchronous I/O runtime that uses Google's V8 JavaScript engine and libuv library. It is used for developing applications that make heavy use of the ability to run JavaScript both on the client as well as on the server side and therefore benefit from the re-usability of code and the lack of context switching.

node.js
Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

Adding custom message properties when creating Service Bus Topic messages with Node.js

I have a topic with multiple subscriptions and need to add a filter to each of the subsbscriptions to trigger a corresponding function app. Here is my Node.js code to create a message: const router = ...
Octo's user avatar
  • 93
0 votes
0 answers
5 views

Cant send cookie at res when user using Safari/iOS

With a web server build with Node.js and Express.js I'm attaching the cookies at the response res.cookie('token', token, { httpOnly: true, expires: new Date(Date.now() + sixMonths), secure:...
Steve Gkortsopoulos's user avatar
-1 votes
0 answers
4 views

Why does corepack try to install yarn v1.22 by default when v4.11 is the latest?

I can see corepack about to download yarn v1.22 when I run the yarn command: user@laptop:~/empty-directory$ yarn Corepack is about to download https://registry.yarnpkg.com/yarn/-/yarn-1.22.22.tgz. Do ...
M455's user avatar
  • 13
0 votes
0 answers
11 views

Sync sftp folder with local folder

So I am trying to make my sftp folder synced with a local folder using nodejs. That means that they both always have the same files and also get updated based on which one is newer. The Problem I have ...
Elektrodemon NL's user avatar
-1 votes
1 answer
11 views

I am getting error, when I run my npx command

I wanted check if my game was working or not. npx kah9a-cli-number-gussing-game This is the error! npm ERR! code ENOVERSIONS npm ERR! No versions available for kah9a-cli-number-gussing-game npm ERR! ...
Samiullah Shakil's user avatar
-1 votes
0 answers
5 views

Node.js API script - Can't Fetch a Single Array, Always Gets The Full List of Arrays

I try running my script, and fetch only one single recorded call, but it keeps on fetching the full list of arrays 😐 I changed the numbers and tokens, so fear not :) ` const axios = require('axios'...
porfiri's user avatar
0 votes
0 answers
5 views

My location also moves when dragging the Google Map left and right

I have developed a daycare application, so I want to display the daycare location on Google Maps. I've integrated Google Maps with the React application. When loading the application, it correctly ...
Dilusha Alphonso's user avatar
-1 votes
1 answer
10 views

mqtt message parsing problem in a node.js

I try to extract the state of a switch from a mqtt message I get when the switch toggles. The mqtt message I get is: {"src":"shellyplus1-08b61fd9e540","dst":"...
Jörg jogypilot's user avatar
0 votes
0 answers
15 views

Node docs syntax for function arguments?

I'm going through the node.js docs here. I'm having trouble understanding the syntax in which the arguments to functions are defined. Here's one example of many: stream.pipeline(source[, ...transforms]...
Xen_mar's user avatar
  • 9,000
0 votes
0 answers
22 views

JS Array.push pushes into all arrays inside reduce [duplicate]

JS array.push is pushing into all elements inside a 2D array. const players = "Lisa, Frank, Lucy, Ann, Helen, Fran"; const teamSize = 3; const formTeams = (players, teamSize) => { ...
Rashiq's user avatar
  • 347
0 votes
0 answers
4 views

Get SMS sent using Azure Communication Services

We were using Twilio to manage sending SMS from our product. Twilio has an API that allows us to fetch messages sent from a given account, to a given phone number. We are using this in our end-to-end ...
Emile Paquette's user avatar
-1 votes
0 answers
5 views

Token is not found in params in node

I was trying to verify the token and passes on url but it says token not found const token = req.params.token; console.log(token); try { if (!token) { return res.status(400).json({ ...
Muhammad Hamza's user avatar
-1 votes
0 answers
13 views

error in a user loading controller for excel, but it is an error that does not throw a status

From the front an Excel file is loaded with around 50 to 100 users, some cases may be more, however the problem lies in the fact that, after loading a third of the users, the following error is thrown....
Julian Ignacio Caloggi's user avatar
-1 votes
0 answers
23 views

Cannot use neither import or require in express project

I'm working on a project utilizing Express and NodeJS, and I'm incorporating the chart.js library via npm. However, I'm encountering issues while attempting to import and utilize it within my script. ...
VictoRPiles's user avatar
0 votes
0 answers
4 views

Upload file in GraphQL and apollo-server

I have a Graphql server with Apollo-server and i have an API client in React, i have a form in React to send files, i stock them in a useState to send all in the mutation. In my research i saw i need ...
Alyweb's user avatar
  • 1
0 votes
0 answers
13 views

How do i convert a typescript nodejs project into a single executable exe

i am first compiling my typescript project into javascript for converting it to exe. i tried using https://github.com/nexe/nexe https://github.com/vercel/pkg https://nwjs.io/ I am using Puppeteer ...
Mohammed Mehdi's user avatar
0 votes
0 answers
5 views

Data structure for a console menu in Node.js with nested options that can be navigated backwards

I've been looking at ways to store and navigate a short nested / multi-level menu structure in Node.js. I don't want to display all the options at once, I want to display each submenu independently ...
user2066480's user avatar
  • 1,287
-2 votes
0 answers
11 views

My PUT request works on Postman but not on app.use Node.js

I wrote an api that performs the function of updating user information, and has token-based authentication I wrote an api that performs the function of updating user information, and uses an ...
Hiếu Phạm's user avatar
0 votes
0 answers
15 views

Error updating Angular with .NET Core 5 from version 11 to 12

I am having trouble migrating my Angular project from version 11 to version 12. I actually want to get to the latest version of Angular, but I figured that I would go step by step. The problem I'm ...
Lynley Cotte's user avatar
-1 votes
0 answers
9 views

Is there a way to deploy node.js application (built for Expo App) on your windows server? [closed]

I have a node.js backend application that I want to deploy on my windows server. I have built APK for my mobile app (expo react native) using eas build -p android --profile preview. Currently, I am ...
Basit Khan's user avatar
1 vote
1 answer
17 views

Why Node.JS HTTP server doesn't work properly behind proxy?

I need to implement an HTTP server in Node.JS, using the built-in http module, which will serve a big file from the filesystem. However, I have encountered a problem, my solution works only when used ...
melonfsck's user avatar
-1 votes
0 answers
18 views

Sending an image (png) from my back (Java spring) to the front (react) and printing it

We're encountering difficulties displaying images fetched from a Java Spring backend in a React frontend. Despite successfully retrieving the image data from the backend, we're unable to render it in ...
Ultiorra's user avatar
0 votes
0 answers
10 views

Firebase Realtime Database Error: "db._checkNotDeleted is not a function" in Node.js

I'm working on a Node.js project using Firebase Realtime Database, and I'm encountering an error when trying to match clients with therapists based on their responses. The error message I receive is &...
SIBO's user avatar
  • 1
0 votes
2 answers
27 views

Exporting function(s) does not make it available in other module

I'm trying to use the retrieve_endpoints function in cli_config.js. I added the functions to the module exports and added the require in the cli_config file. Why can't I seem to call the ...
Alexandre Delizée's user avatar
0 votes
0 answers
18 views

Puppeteer on Kubernetes throws errors: "Navigation frame was detached", "Requesting main frame too early"

I am trying to run a nodejs based Docker container on a k8s cluster. The code refuses to run, and continuously getting errors: Navigation frame was detached Requesting main frame too early I cut down ...
Ori Shuchami's user avatar
0 votes
0 answers
7 views

empty output files when using gdal.vectorTranslate

Using gdal-async in nodejs, im trying to convert verctor files from geojson to dxf. const dsGeoJSON2 = gdal.open('./upload2/objects.geojson'); const out2 = gdal.vectorTranslate('./upload2/objects.dxf'...
Nabil ameg's user avatar
-1 votes
0 answers
12 views

Error handler middleware is not running in express app

The error is being handled by express inbuilt error handler. But I want it to run my custom handler on catch of an error. Here is the code: miscellaneousAPI.js: router.get("/exception", ...
dev's user avatar
  • 9
0 votes
0 answers
13 views

Node Redis-OM: this[#schema].generateId is not a function

Hi everyone I am trying to save an entinty into a redis repository, the driver is correctly connected the schema is created as edxpected same with the repo. The problem comes when I try to save the ...
Estiwer's user avatar
  • 163
0 votes
0 answers
20 views

node js and mysql issue

I created a node.js app, that deals with a mysql database and also renders a very simple index.html as a front end. I tried to deploy it on render but after a few second of successfull connection it ...
kelbal's user avatar
  • 3
0 votes
0 answers
17 views

State not immediately saved with socket.io

As you can see in my problem below I receive a message with the action stop. There I update 3 useState variables. My problem is with the setTotalScore. TotalScore is 0 in the beginning and when i ...
Bog the Coder's user avatar
-1 votes
0 answers
25 views

Throwing an error in Azure Storage Queue Trigger

I am calling an external API in my azure storage queue trigger which itself, is initiated by another endpoint. Calling the external API might fail, therefore I would like throw an error so that my ...
mac125's user avatar
  • 101
0 votes
1 answer
27 views

How to send a big array to a client faster

Im coding an r/place clone right now and I'm having issues with sending the stored pixel data from the server to the connecting clients. While it works, it takes a bit too much time depending on the ...
Little Yuuta's user avatar
0 votes
1 answer
20 views

EADDRNOTAVAIL Node JS

Title: "Encountering EADDRNOTAVAIL Error After Processing Specific Number of Requests in Node.js" Body: I have two servers set up. One is named processUpdate and the other actionUpdate. On ...
mehmtee10's user avatar
-3 votes
0 answers
11 views

How to send or save my cookie in frontend when using HTTP

how to send or save my cookie in frontend when sending request from http in mern stack and it is saving in my backend when i am using postman so why it is not saving my request in the frontend an ...
Ayush's user avatar
  • 1
0 votes
0 answers
11 views

Spotify Web API returning 'Insufficient client scope.' despite full client scopes

I have written a program that intends to add songs to my own spotify playlist. The below is the auth code: const { SpotifyWebApi } = require('spotify-web-api-node'); module.exports = async (req, ...
kris's user avatar
  • 11
-1 votes
0 answers
12 views

Inquiry: ARM Compatibility for Puppeteer

I'm reaching out to inquire about the compatibility of Puppeteer with ARM architecture. I've scoured through the documentation but couldn't find any explicit mention regarding ARM compatibility. ...
Prashant Dwivedi's user avatar
0 votes
0 answers
5 views

How can i read image from cell using xlsx-populate package

I am using xlsx-populate package to read the XLSX data using below code. // ... import statement reading file statement wb.sheet(0).usedRange().forEach((cell: any) => { console.log(cell); }); ...
Bhautik Chudasama's user avatar
0 votes
0 answers
13 views

Building a service which sends emails everyday to the user at a particular time. (NOT RUNNING)

i was writing code for a service which sends email daily to the user at the given time input by the user in the frontend. The time gets stored in timings collection for that particular user and then, ...
Prakhar10's user avatar
0 votes
1 answer
7 views

Run multiple CLI commands inside ONE child process, but HANDLE each output separately in Node

I need to execute a batch CLI commands inside the only in one child process. For example, suppose i have these shell commands: echo 1 echo 2 echo 3 As i know, the child_process.exec not really fits ...
KR1470R's user avatar
  • 129
0 votes
0 answers
6 views

i keep get this error "Error: Command failed with ENOENT: ts-node prisma/seed.ts spawn ts-node" when i run npx prisma db seed

I really need help after I updated my prisma schema I got this error when I run npx prisma db seed Error: Command failed with ENOENT: ts-node prisma/seed.ts spawn ts-node
David Akinola's user avatar
0 votes
2 answers
38 views

Can someone help me identify why this express server returns a 404?

This test fails with a 404 error, can someone help me figure out what is wrong because I really don't see the issue, I need a second pair of eyes I think. I am trying to mock a Microsoft Graph API ...
martin8768's user avatar
0 votes
1 answer
21 views

How can I publish library from dist directory saving node_modules?

I want to publish npm package and have next type of import: import { Component } from "my-lybrary/Component" I found out that I have to copy my package.json to dist directory and run npm ...
Marina Golovanova's user avatar
0 votes
5 answers
49 views

create-react-app command throws npm ENOENT error

I am new to React and NodeJS. I am trying to create a React app using the command npx create-react-app my-app, but every time I run this command, I get the error shown below about MySQL does react ...
themaestrocode's user avatar
0 votes
0 answers
12 views

How to resolve ERR_PACKAGE_PATH_NOT_EXPORTED error in Node.js?

I'm working with Node.js and utilizing the Langchain package. Here is my JavaScript code: import "dotenv/config"; import { ChatOpenAI } from "@langchain/openai"; const chatModel = ...
Jhj's user avatar
  • 13
0 votes
0 answers
10 views

How to handle errors inside a NodeJS stream?

I'm trying to find a way to send a NestJS HTTP Error within a readable stream when the data is not valid: stream .pipe(csv()) .on('data', (data) => { try { ...
Timóteo Stifft's user avatar
0 votes
1 answer
34 views

React not displaying the data fetched from MongoDB using Node/Express JS

I'm pretty new to the MERN stack and recently tried creating a database and fetching the data from one of the collections on my database. When i try to fetch the collections in my database, it shows ...
Nicoo Repz's user avatar
-1 votes
0 answers
17 views

How can I inject the prisma io module using inversify in my node.js project?

As mentioned in the title, I am trying to do dependency injection operations with a node.js project, but I don't know how to use the inversify module with prisma. I did a lot of research on the ...
Ramazan Koldaş's user avatar
-1 votes
0 answers
14 views

Session custom property getting undefined when calling Node js API from Javascript fetch

I am developing a User Login Project where Apis are written in node js and express, UI part is written in HTML and Javascript. These both are two individual projects. When User logins, a fetch cal is ...
Revanth Sai's user avatar
0 votes
1 answer
49 views

How to connect express js from azure function Model v4?

My azure function using Model v4 index.ts import { app } from "@azure/functions"; import azureFunctionHandler from "azure-aws-serverless-express"; import expressApp from "../.....
Murugesan R's user avatar
0 votes
0 answers
8 views

Backup and restoring Hyperledger fabric network one instance to other instanc

#!/bin/bash echo "One click backup" set -e if [ -d "./backup" ] then echo "Back up is already exists." sudo cp -r ../wallet/ backup/ # sudo rm -rf backup ...
shambhu's user avatar

1
2 3 4 5
9437