Skip to main content
Filter by
Sorted by
Tagged with
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}/...
-2 votes
0 answers
16 views

How to Generate Reports from MongoDB Community Edition and Integrate Them into a React UI?

I am using MongoDB Community Edition as my database and need to generate reports based on the data stored in my collections. The reports should be query-driven and provide insights such as aggregated ...
0 votes
0 answers
20 views

Passport JWT Unauthorized in node js and angular

I am using passport jwt with node and Angular. it is throwing unauthorized error. I have tried with many solution on other stackoverflow questions but nothing works. I am using sequalize with MySQL ...
-1 votes
1 answer
19 views

Bad Option: --env-file=./env/.env.dev

I am unable to load the env file via start script in my package.json file because of which I am not able to work on my project, earlier with all these stated settings it used to work fine. package....
1 vote
3 answers
2k views

Puppeteer - Map real mobile device behavior in headless (true | false) mode

I want to emulate a custom device ( real mobile device dimensions) with a puppeteer, and I expect same browser behavior in real mobile device and puppeteer. I tried const _op = { args: [ ...
0 votes
0 answers
9 views

Meta WhatsApp Cloud API: "(#100) Invalid parameter" error while sending template message in Node.js

I'm trying to integrate the Meta WhatsApp Cloud API in my Node.js + Express project to send a registration confirmation message after a user signs up. However, I am encountering an error: (#100) ...
2 votes
1 answer
11k views

Node - NPM Keep throwing unknown error

I am trying to install package.json, But I keep getting a error as follows: how can i over come with this? my package.json: { "name": "application-name", "version": "0.0.1", "private": true, ...
0 votes
1 answer
16 views

Where do I find server response data in socket.io-client?

I am interested in creating (for testing purposes) a fake client that mimics a browser accessing a route in a Node.js HTTP server. In the minimal example below, I am able to point an actual browser to ...
0 votes
1 answer
122 views

How do I use crypto.createSign() with ED25519 key?

I'm trying to sign some data with ED25519 in Node.js using crypto.sign(). This is almost completely copied from Node.js docs. const sign = createSign('ed25519'); sign.update('<sensitive data here&...
0 votes
0 answers
12 views

Express.js with HTTP/2 (SPDY) - net::ERR_HTTP2_PROTOCOL_ERROR in Chrome Only

I have a Node.js server using Express.js with SPDY to enable HTTP/2 requests. The goal is to handle more concurrent streams than HTTP/1.1 allows. Setup I'm using SPDY to create an HTTP/2 server: ...
-3 votes
0 answers
17 views

can we intergrate whole apache superset system with react.js and node.js? [closed]

I am working on a project where I need to integrate Apache Superset (for data visualization) with a React.js frontend and a Node.js backend. Here’s what I’m trying to achieve: Frontend: React.js for ...
3 votes
4 answers
2k views

Javascript resolve first element in array of promises that has been fullfilled in order

I'm doing multiple requests to different APIs (simulated by the delayedPromise function) which each take a certain amount of time to fulfill. If one of them fulfills I return the value it resolves and ...
1 vote
1 answer
535 views

How to send image in a JSON API request to an Express server

As of writing this, I haven't found an answer that answers my question. I am building a REST API for an ExpressJS backend server, that has multiple endpoints. One of them is called /company/create, ...
0 votes
0 answers
10 views

Hyperledger Fabric - Register and Enroll new Users

I am new to Hyperledger Fabric and, hence, to Fabric integrations with apps. My intent was on creating an API using Node that would register and enroll new Users. I know and have been successful doing ...
-1 votes
0 answers
9 views

Issue Uploading File to Stratus Bucket Using Node.js SDK

I am trying to upload my file to the Stratus bucket using the Node.js SDK method, but despite multiple attempts, the file is not uploading properly. If someone can provide a working example of how to ...
0 votes
0 answers
17 views

How to extract a specific column information from a pdf using flutter

I have a pdf file which has a table. Inside the table I have multiple columns. I want to extract the data from a specific column for all the entries. The pdf might contain multiple pages. I am able to ...
0 votes
1 answer
27 views

GitHub Actions Node.js Workflow: Use Node Error

I am trying to create a Node.js workflow in GitHub Actions to build and run tests for every pull and push action on main brach. The workflow has following jobs config: jobs: build: runs-on: ...
-1 votes
3 answers
6k views

Kong 502 Bad Gateway: "An invalid response was received from the upstream server"

TL;DR I can't send HTTP request to local docker container (accessible via 127.0.0.1:4002) through Kong gateway. Kong Gateway components: Service test_service: url=http://127.0.0.1:4002; Route ...
0 votes
1 answer
32 views

Error handling in NodeJS service classes and controllers

I am very new to both JavaScript and NodeJS and am struggling to grapple some of the concepts surrounding async, promises, and others, and especially how to structure the code properly. I am trying to ...
30 votes
13 answers
35k views

How to stop running node in docker

I have just installed dockers and installed node. I am able to run a basic express site. My issue now is I can't stop it. Control-C is not doing anything. Temporarily what I did to exit was: Close ...
0 votes
0 answers
26 views

How can I prevent my node production deployment from installed devDependencies?

I'm running into an issue with the production deployment of my Node app. When I deploy to dev it's fine. When I deploy to production, the build errors on the node-sass package. Based on this SO thread ...
1 vote
0 answers
10 views

Firebase functions not changing firestore database

I'm new to firebase functions and recently I was tasked with adding two new functions. One needs to run daily at midnight and the other runs whenever a budget for an order in a firebase collection (...
16 votes
4 answers
37k views

Unable to install and use NodeJS using FNM

I installed FMM on my windows 10 laptop using below command winget install Schniz.fnm After installation, I downloaded NodeJS using fnm install 16.2.0 After this step when I type fnm use 16.2.0 I get ...
13 votes
8 answers
20k views

Newly created angular project has errors

for some unknown reason a freshly generated angular 14.1 project does not work. it seems like npm i will download corrupt libs. deleting node_modules won't help.. the file (node_modules/@types/node/...
0 votes
0 answers
7 views

In node js docx library im trying to generate a word document. if i change PageMargin, the headers and footers also got affected by it.what to do?

enter image description here sections: [{ properties: { page: { margin: { top: 0, // 1 inch left: 1440, // 2 inches (shifts content right) right: 1440, // 1 inch (affects ...
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 ...
-2 votes
0 answers
24 views

Can't npm install about anything on my VPS [closed]

This issue just popped up recently, like 20 minutes ago and I have no idea what's causing it. Prior to those 20 minutes, npm install was working just fine. I'm involved currently in web development ...
0 votes
0 answers
22 views

Unable to Access Blob Trigger Using Managed Identity in Azure Functions

I am trying to access a blob trigger in Azure Functions using a managed identity but am encountering issues. I have followed the instructions in the documentation and blog posts, but the issue ...
2 votes
2 answers
4k views

Override NestJS route within controller

I want to completely override a controller route. E. g: @Controller('shipments') export class ShipmentsController { @Post('/create') async find(): Promise<Activities> { return service....
16 votes
4 answers
26k views

Why does import of an ESM module in a CommonJS TypeScript project, result in ERR_REQUIRE_ESM?

I am trying to import the package p-limit into my typescript project. When trying to run the project using tsc && node serve.js, I run into the error below. Im stuck at this for a few hours ...
349 votes
15 answers
258k views

Is it safe to store a JWT in localStorage with ReactJS?

I'm currently building a single page application using ReactJS. I read that one of the reasons for not using localStorage is because of XSS vulnerabilities. Since React escapes all user input, would ...
0 votes
1 answer
22 views

ERR_NETWORK_IMPORT_DISALLOWED when I run `firebase emulators:start`

I am implementing a payment gateway. I am using Firebase Cloud Functions to run these APIs. I have a functions folder that has my functions and everything is set up for them. I am emulating the ...
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 ...
814 votes
28 answers
1.2m views

How to run TypeScript files from command line?

I'm having a surprisingly hard time finding an answer to this. With plain Node.JS, you can run any js file with node path/to/file.js, with CoffeeScript it's coffee hello.coffee and ES6 has babel-node ...
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 ...
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 ...
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 ...
55 votes
9 answers
51k views

Package that is linked with npm link doesn't update

I have two modules - my main project and a component library - where I want to link the lib to the main project. Both is working with webpack and react. So I did: In comp-lib dir: npm link In ...
3 votes
3 answers
1k views

How to handle DeviceNotRegistered error using expo-server-sdk-node

I built a push notification system on my backend using expo-server-sdk-node. When I want to send notifications, I lookup the expoPushToken in my database. The docs states the following error(s) should ...
0 votes
1 answer
14 views

Node utils inspect function is it really bullet proof, and never throws an exception?

Starting from this code const input:unknown // an unknown input that might be any type try { // trying to stringify it might throw (e.g. for circular references) ...
0 votes
0 answers
19 views

Getting gibberish file when trying to download a mp3 file using playwright

So, I am trying to create a scraper for a online playlist and using playwright as I have been trying my hand at this framework but when downloading a mp3 file, no matter whatever I try using different ...
-1 votes
0 answers
22 views

Using TensorFlow.js to Correct Sentences Based on Training Data

I'm working on a Node.js project that uses TensorFlow.js to correct sentences based on a training dataset. The dataset consists of example sentences, and I want the machine learning model to learn ...
17 votes
5 answers
25k views

Mongoose overwrite the document rather that `$set` fields

Say, i have a document: { _id: 'some_mongodb_id', name: 'john doe', phone: '+12345678901', } I want to update this document: .findOneAndUpdate({_id: 'some_mongodb_id'}, {name: 'Dan smith'}) ...
0 votes
0 answers
18 views

Using pgBouncer on DigitalOcean with Node.js pg Pool and Kysely – Can They Coexist?

I'm running a Node.js application that connects to my PostgreSQL database using Kysely and the pg Pool. Here's the snippet of my current DB connection logic. I have deployed my database on ...
-1 votes
0 answers
19 views

Creating and managing multiple instances of whatsapp web js in Nodejs app

I want to create and manage multiple instances of whatsapp web js exactly as mentioned in the below post: Creating and managing multiple instances of whatsapp web js I got the source code of the "...
57 votes
4 answers
36k views

Remove all ANSI colors/styles from strings

I use a library that adds ANSI colors / styles to strings. For example: > "Hello World".rgb(255, 255, 255) '\u001b[38;5;231mHello World\u001b[0m' > "Hello World".rgb(255, 255, 255).bold() '\...
29 votes
12 answers
64k views

MalformedXML: The XML you provided was not well-formed or did not validate against our published schema

I am having this weird issue while working with AWS S3. I am working on application by which I can store the images to AWS bucket. Using Multer as middleware and S3FS library to connect and upload to ...
166 votes
14 answers
106k views

How to clone a javascript ES6 class instance

How do I clone a Javascript class instance using ES6. I'm not interested in solutions based on jquery or $extend. I've seen quite old discussions of object cloning that suggest that the problem is ...
1 vote
3 answers
161 views

Lambda@edge error handling with async/await (nodejs)

I've been creating lambda@edge functions to do various actions on a viewer request event from cloudfront. Most examples I can find seem to use callbacks but I wanted to use the async/await pattern ...
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 ...

1
2 3 4 5
9470