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 server side and therefore benefit from the re-usability of code and the lack of context switching.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Unable to get AWS/SDK S3 CreateReadStream to work right

I've tried a million iterations of this, and I figure I'll ask the experts now. I simply want to read a file from AWS S3 and write it to a file using a stream. This is in a Lambda function. I've ...
user avatar
0 votes
1 answer
12 views

How can I put the value of the array object using useState when rendering for the first time in Reactnative?

I have an object array called targetFarm, and when I run the map function, the value comes out like this. targetFarm.children.map((item) => item.children.map((v) => console.log("v:", v)...
user avatar
0 votes
0 answers
19 views

NestJS, Typeorm, MS SQL server - Failed to connect to localhost:1433 - Could not connect (sequence)

I am trying to connect to a locally running mssql database using Typeorm and nestJS. I have created a new database in SSMS Express, created a database and created a new login, giving the user db_owner ...
user avatar
0 votes
2 answers
20 views

if else statement not returning anything

I'm creating a dashboard for a project that I am working on. I'm using nodejs in my backend with mongodb as my database. I'm trying to calculate total sales tax owed, which in this project's case ...
user avatar
  • 115
-1 votes
0 answers
11 views

Request Blocked by CORS policy after setting header

I'm currently developing a server using express with NodeJS, and I've ran into an issue with the CORS policy. In my servers code, I have app.get(`/important`, function(req,res){ fs.readFile('./...
user avatar
  • 89
0 votes
0 answers
9 views

Return specific fields in cloudant

I'm making a .list() call on cloudantDB using node.JS and I have the following return "success": true, "data": { "status": true, "res": { ...
user avatar
0 votes
0 answers
8 views

Express Custom Validator always returning Error

This is part of my login API used to validate the new user details. The function ifIDAlreadyExist checks the DB and returns true/false for exists/not exists respectively. Even when the result is false,...
user avatar
  • 91
0 votes
0 answers
7 views

NodeJS - Download MP3 file one at a time

Im trying to make a quick node script to download MP3s from a RSS feed. At the moment I have this : const https = require('https'); const xml2js = require('xml2js'); const parser = new xml2js....
user avatar
0 votes
0 answers
10 views

Calculating total current using MongoDB time series feature

I am playing with the MongoDB time series feature. I am getting some data from an IoT device. It has different ports, and it transmits data continuously. I have created a time series collection using ...
user avatar
-1 votes
0 answers
35 views

Uploading an image file with NodeJS, getting error 'Cannot read properties of undefined (reading 'name')'

I have a very simple website that I would like it's user to be able to upload different file types, but I keep running into the error 'Cannot read properties of undefined (reading 'name')' My app.js ...
user avatar
0 votes
1 answer
8 views

React / Node - PayPal AUTHENTICATION_FAILURE with react-paypal-express-checkout

Im using react-paypal-express-checkout and today i recognized that i cant do a test payment anymore. I even load a month old build, where everything was fine but still same error. So i don't think it'...
user avatar
  • 55
0 votes
0 answers
19 views

How can I iterate over an object of arrays and filter out the entries from each array without naming its property. Using JavaScript & Mongoose

Using JavaScript, What I can render so far are the entries from a Table using a filter to display on client side what I need to show. What I would like to is build a mongoose query to have the entries ...
user avatar
0 votes
0 answers
8 views

Does Twilio require special configuration when running behind an https server?

I've integrated the basic Twilio SMS functionality for NodeJS ( v16.13.1 ) on my local machine ( http ) and have seen everything working fine. But once it's deployed onto may staging server ( https ) ...
user avatar
  • 1,552
-1 votes
0 answers
14 views

Cannot install packages with npm install

I can't install any packages with npm install This is the (short)log: npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. npm ERR! code 1 npm ERR! path C:\...
user avatar
0 votes
0 answers
14 views

nodejs got/await http calls stop executing after await

So I have a script that has created a list of json data it's iterating through and sending requests. I've run into an issue, however, with awaiting for the response to come back with multiple packages....
user avatar
0 votes
0 answers
13 views

req.isAuthenticated() return false after login

Okay, so I created a (working) login system, but after I click "login" button - the website redirect's me into path that I put into successRedirect in passport.authenticate, but when I check ...
user avatar
  • 69
0 votes
0 answers
29 views

how to redirect from https:// to blob:https:// [duplicate]

hello can i use url ( blob:https://test.com/index.html ) instead of (https://test.com/index.html) ?or how can i convert my link into it, for exemple when i click to my link (https://test.com/index....
user avatar
-2 votes
0 answers
24 views

Script needs to connect to MySQL which is running on a remote desktop

I have a node.js script that takes some data and pushes it to MySQL database. The MySQL database is up and running on my remote desktop (Windows 10). I have created 4 tables in the database. Created a ...
user avatar
0 votes
1 answer
19 views

How does response work inside callback in Express/Node?

I have an async function which fetches some data from a file and then calls the callback function to return the result: static fetchAll(callback){ fs.readFile(pathToDB, (err, fileContent) =...
user avatar
1 vote
0 answers
13 views

Why would my Oauth POST request to Twitter Ads API fail, while the GET request works fine

I've successfully been able to query the Twitter Ads API with GET requests, but I'm trying to POST (to generate reports) and those keep failing with an UNAUTHROIZED_ACCESS "This request is not ...
user avatar
0 votes
0 answers
24 views

Two arrays inside an array with mongodb/mongoose

I have the following mongodb's query: db.history.distinct('city',{code: 'A-200-01'}) Then I get this: [1.0, 2.0] As you can see it's a simple array. And i'd like to get an array with two arrays ...
user avatar
0 votes
0 answers
14 views

sent an invalid response. ERR_INVALID_HTTP_RESPONSE with nodejs and amazon aws server react and MySQL

I am getting the error my-endpoint.amazonaws.com sent an invalid response. ERR_INVALID_HTTP_RESPONSE when I try to connect to the amazonaws which hosts my MySQL database. I know my credentials are ...
user avatar
  • 3
0 votes
0 answers
51 views

How do I create two separate audio streams using the same virtual audio driver?

I'm currently trying to develop a Node.js application on MacOS that routes audio from a camera rtsp to a virtual audio driver (SoundPusher) to be played through Zoom mic as one stream as well as grab ...
user avatar
0 votes
0 answers
4 views

Passport.js failureMessage vs failureFlash

I was reading the passport.authenticate options docs and I don't understand failureMessage or failureFlash. What do each of these do? From what I gather, failureFlash is for showing an error message ...
user avatar
  • 354
-2 votes
0 answers
13 views

I want to learn node js. I want to connect to mysql in my cpanel. But I can not. 10 seconds after running it writes error db. How can I fix

var con = mysql.createConnection({ host: "my ıp adress", user: "my username", password: "my pass" }); con.connect(function (err) { if (err) { console.log('...
user avatar
0 votes
0 answers
10 views

Is there any specific inject command for nestjs to input array dto

I am making ecommerce application. I want to take input different color from user (basically a seller) for their product if available. For example Shirt have 3 colors White,blue and black. I am using ...
user avatar
0 votes
1 answer
12 views

Serving an image from Node.js to React (how does the frontend part work?)

I know there are a lot of similar posts out there yet after reading as many as I could find I am still left with questions. I have a site set up with a node server running on port 5000 and React ...
user avatar
-1 votes
0 answers
17 views

Npm doesn't finish the command

I'm using node 16.16 and if I tried to run any command they should create file this is what I get for example when I try to run npx create-react-app my-app it will create the package.json, package-...
user avatar
0 votes
0 answers
9 views

Connecting mongoose to AWS documentDB

I am trying to connect a NodeJS server to an AWS documentDB cluster with TLS enabled. The NodeJS server is hosted on an EC2 instance and it's on the same VPC as the documentDB cluster. But I'm getting ...
user avatar
-1 votes
0 answers
11 views

srcObject showing undefined ,couldn;t get the input as expected

I was trying to build a custom video chat app with socket.io ,react and express . But while getting the input of my own video camera I am facing a problem which showing an error with a message of &...
user avatar
0 votes
0 answers
19 views

Best Way to Handle Long Running Process Nodejs

I am developing an app that updates products in Shopify. On the React front end, the user can "Activate" the app and run the logic that checks and updates every product in their online store....
user avatar
-1 votes
0 answers
18 views

i am trying to send a transaction but it throws an error

eror on terminal if (!cond) throw new Error(msg) ^ Error: Expected private key to be an Uint8Array with length 32 my Code its about signing eror. I am absolutely lost as to why this is ...
user avatar
  • 1
-1 votes
1 answer
15 views

Returning API JSON through a proxy in NodeJS

I'm trying console log the json for an API after sending my request through a proxy, however when the code runs the console logs nothing. Here is my code. const express = require('express'); const app ...
user avatar
0 votes
0 answers
14 views

Configure IIS hosted website to run a stripe.js integration

I am currently trying to get my stripe.js integration to work in production on our website. Our site is hosted via Windows IIS, and I have followed several tutorials on getting this to work using ...
user avatar
  • 11
0 votes
0 answers
19 views

Failing to do npm install

running npm install in visual code is giving following error. To fix the error i did the following. From other posts on stack overflow and suggestive errors indicated that i need to install visual ...
user avatar
0 votes
0 answers
8 views

I was unable to install the latest nodejs package on my parrot os. i had version 12 installed but wasn't working when i tried create a new react app

error: npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /usr/local/lib/node_modules/n npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/n' npm ...
user avatar
-2 votes
0 answers
13 views

I am making my own "web text editor" for my personal blog but the js script isn't working [closed]

The problem is the js doesn't work properly, when i call the api(nodejs). For first 3-4 clicks on the top 2nd icon which is insert image type feature doesn't work and I cannot add more than one image ...
user avatar
  • 14
0 votes
0 answers
4 views

NextJs -> ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema

So I just upgraded from Next v12 to v12.2.3, created a new middleware.js file in the root directory, tried to do a "yarn dev" and got this: ValidationError: Invalid configuration object. ...
user avatar
  • 993
1 vote
0 answers
23 views

POST requests backlogged after six requests from same browser in express. Unexpected/Strange behaviour

I have an app which takes a long time to procces post requests. if a client sends more than 6 requests in a short space of time (say 5 seconds), I get some unexpected behaivior. for example: ...
user avatar
0 votes
1 answer
11 views

Webpack configuration problem with module.exports entry

I'm trying to configurate webpack but I stuck because of this error. I think the problem is with entry. But when i try to add it without path: like in tutorial i get "(property) path: path....
user avatar
  • 36
0 votes
1 answer
8 views

Cannot log in to mariadb from node.js app

I can log in with the same credentials from Windows Command Line and from MariaDB admin. But trying to log in from node.js app fails... const mariadb = require('mariadb'); const pool = mariadb....
user avatar
0 votes
1 answer
28 views

has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource express react client

Tryed a couple links here, some tutorials and documentations and running after my tail because i'm not getting anywhere. Service code: const express = require('express') const cors = require('cors'); ...
user avatar
0 votes
2 answers
22 views

How to create/config a NodeTS(TypeScript NodeJS) project?

I am trying to create and run a simple TypeScript NodeJS project. Followings are my codes: server.ts: import express from 'express'; const app = express(); const PORT = 3000; app.listen(PORT , ()=&...
user avatar
  • 1,014
0 votes
0 answers
7 views

How to get my Argon-Dashboard-Pro-Nodejs from Creative Tim to start?

I built an admin dashboard with Creative Tim's argon-dashboard-pro-nodejs template about two years ago. They no longer maintain this template and they haven't updated it in about 4 years. I haven't ...
user avatar
  • 35
0 votes
1 answer
17 views

Why does my NestJS library work only if I installed it from NPM?

I'm making a NestJS library and got a very strange problem. To test my library, I created a simple NestJS project and linked my library via yarn link into it. And when I start my project it always ...
user avatar
0 votes
0 answers
16 views

The web-application in the js-script creates a JSON-object. How can I save it as a file to my hard drive?

In my web application (in the frontend, in a js script), an object is created, which is then converted into a JSON object. How can i save it to my hard drive? What should be used for this? Is it ...
user avatar
0 votes
1 answer
9 views

How to build web-end client using Node.JS to connect to Hyperledger Gateway

I am having a difficult time building a client web interface for a Hyperledger system. From what I can tell, I must do the following import on my Node script: import { Gateway } from 'fabric-network'; ...
user avatar
-1 votes
0 answers
12 views

Generating JS file using Mustache

I'm trying to generate JS files using Mustache templating. I'm using NodeJS and want to create a JS file to make development during React projects faster. Now I've created below template: export { ...
user avatar
-1 votes
0 answers
12 views

¿How can i accept debit and credit card in Uruguay? [closed]

I am developing an ecommerce using React and NodeJS. For payments I was thinking of Stripe, until I saw that it was not available in Uruguay. Is there an alternative to Stripe to accept debit and ...
user avatar
  • 1
-1 votes
1 answer
34 views

Nodejs Array prototype filter in a JSON

I'm trying a function to return some filtered string inside a JSON. Could I have some advise? Thank you So in the example bellow my JSON is coming like this: [ { line: '{"status":"...
user avatar

1
2 3 4 5
8753