Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
0 answers
35 views

This is not a duplicate to this question since it discusses rejecting promises. This is about errors that are thrown. It is also worth mentioning that I can't modify the behavior of the mpv....
Omaro_IB's user avatar
  • 435
0 votes
1 answer
190 views

I am newbie to Javascript and been reading the David's Flanagan Guide to have general overview. This code snippet made me confused. I could not realise how the Promise in loop is 'dequeued' before ...
Harpy Cutie's user avatar
0 votes
1 answer
209 views

function debouncePromise<TParams extends Array<unknown>, TRes>( fn: (a: TParams) => Promise<TRes>, time: number, ) { let timerId: ReturnType<typeof setTimeout> | ...
tem's user avatar
  • 43
0 votes
0 answers
63 views

I have written a routine for queueing a set of http requests so that they happen in sequence instead of concurrently. I am using this async library: https://caolan.github.io/async/v3/. This is ...
Matt Pennington's user avatar
-1 votes
1 answer
74 views

I am getting error of** "News.js:16 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'state')"** when ever i am clicking on next button. error occur in URL of ...
Rafia Khurshid's user avatar
0 votes
2 answers
85 views

const p1 = new Promise((resolve,reject) => { setTimeout(()=>{ resolve("xxx"); }, 5000) }); const p2 = new Promise((resolve,reject) => { setTimeout(()=>{ resolve("xx"); }, ...
Rocko's user avatar
  • 47
1 vote
1 answer
38 views

I am currently working on the capstone for my course, but I have to use multiple async functions. I need to use AsyncStorage, SQLite storage, and fetching from a REST API. The issue I am encountering ...
Abraham Guerrero's user avatar
0 votes
2 answers
219 views

So I want to do some web scraping, using AppleScript to run javascript code on a webpage. I have the following code: (edited to remove proprietary data) function inputPunch(date_string) { // ...
Dyskord's user avatar
  • 397
0 votes
1 answer
97 views

I have a huge form with all kind of inputs that I need to do data treatment and then register directly on multiples spreadsheets. The first part of getting the values and sending it to the ...
David Paiva's user avatar
0 votes
0 answers
17 views

I have an User context provider where I want to store functions that validate and refresh his JWT token before every request. Here is template of my code const UserContext = createContext({}) const ...
Marlboro_Red's user avatar
1 vote
2 answers
2k views

I want to verify the user credentials before any page of my site load, so I put an script in the top of each of my HTML document. But this script in particularly has Async functions (because it sends ...
C410lol's user avatar
  • 11
0 votes
0 answers
28 views

async.eachSeries([1,2,3], async(item, callback) => { //await delay(6000); console.log(item); callback(null); }, function(done) { if(done == null){ } }); ...
Pankaj Gupta's user avatar
1 vote
0 answers
107 views

I have a folder with 4 files with CSS styles. Using Node.js modules tried to create a new file 'bundle.css' and append content of these 4 files with style (css). But the code instead of styles, return:...
codingForCode's user avatar
0 votes
1 answer
166 views

I am using NodeJS 18 version, and I am trying to paginate the dynamo DB results using the async function, but it is not giving me any results. My dynamo DB table has the data. I am using the dynamo db ...
Aravindan vaithialingam's user avatar
0 votes
1 answer
1k views

I am trying to implement sorting algorithms and build react app to display how unsorted array is changing with each iteration. To make it visible, app has to stop for some time after every iteration ...
Marlboro_Red's user avatar
0 votes
0 answers
28 views

Hello I got a problem that mongodb client try to check if collection exist or not Here is the connect function: const { MongoClient } = require("mongodb"); const async = require("async&...
RageOfFire's user avatar
1 vote
1 answer
35 views

I have a query that outside the emulator is always returning a document reference property as undefined. UPDATE: The issue is happening when running from the browser. Of course, I checked the ...
angelcervera's user avatar
  • 4,259
-1 votes
2 answers
83 views

I am tasked with fetching data from an API and storing that data on a card for the game jeopardy I am creating. I am able to successfully fetch my data question from my api but am having a hard time ...
Antrhopos's user avatar
1 vote
0 answers
74 views

So Im building sort of 'fuzzy_search' tool that search with selective precision. Divide string on chunks and if some of them are similar to firebase entries it return array of suggested items. And it ...
Alex Pavliuk's user avatar
0 votes
1 answer
55 views

I am working with mongodb in sails js. we are using async.auto from async.js. I am creating a new mongo connection for few reasons and firing find query to get the data, after retrieving data from db ...
Abhishek Kokate's user avatar
0 votes
1 answer
475 views

I looking for a way to detect if my function inside the decorator is async or not. function catchError(target: any, propertyName: string, descriptor: PropertyDescriptor) { const method = ...
elija's user avatar
  • 21
-2 votes
1 answer
106 views

I have a Chrome extension with the following js code in the initial HTML. (async() => { console.log("Starting wrapper"); await document.getElementById("start")....
Wt Riker's user avatar
  • 624
0 votes
1 answer
200 views

below is the complete code, I have added the issue description before each line when the issue occurred: class AuthService { //sign up user void signUpUser({ required BuildContext context, ...
marc's user avatar
  • 29
0 votes
1 answer
42 views

In Node.js, can it happen that when different properties of a global object are written at the same time (with a socket.io request), one of the properties retains its original value? ` var rooms = { ...
HU TanKy's user avatar
0 votes
0 answers
106 views

so I have this feature that I am working on that takes an object (Over 10k items) picks an item from this object, sends it to an api, which process it then give a response, then proceeds to the next ...
vhiktordom's user avatar
0 votes
1 answer
203 views

I'm using the async library to create a queue. My code for my queue looks something like this. const async = require('async'); const db = require('../models'); const logger = require('../logger'); var ...
Joseph Astrahan's user avatar
0 votes
0 answers
23 views

strong textI am trying to add plus and minus to input form. the input is only created in js script so it doesnt exist on DOM yet when calling the event. I tried async function but that didn't really ...
webmar's user avatar
  • 27
0 votes
1 answer
287 views

I'm a bit confused because all the examples I read about Node cluster module only seem to apply to webservers and concurrent requests. Otherwise to CPU intensive application it is recommended to use ...
João Pimentel Ferreira's user avatar
0 votes
1 answer
2k views

I'm using a React library called Leaflet consuming data from Mapbox API to create a map in may delivery services application. I created a method called loadOptions to select one specific address ...
Davi Farias's user avatar
0 votes
1 answer
75 views

We have a utility function that wrappers axios http call; currently it's written in currying form of chained promise as below: request<T>(request: AxiosRequestConfig, x: number, y: string, z: ...
dragonfly02's user avatar
  • 3,709
1 vote
1 answer
57 views

So I'm working on an app, and in the app there's a component that handles a bunch of data mutations. I'll explain it in pseudocode for brevity and link the full code sample below. function ({ API_DATA ...
femiorok's user avatar
0 votes
2 answers
4k views

I'm new too JavaScript and am having trouble with async. I have a webpage with two buttons, If the yes button is pressed it will do some code and if the no button is pressed it will do different code ...
TheCourtJester's user avatar
0 votes
1 answer
121 views

I have a function something like that: async function example(){ let data = await another_function(); var ws = fs.createWriteStream('path'); let jsonData = [{'id':'1234', 'name': 'Alex'}]; fastcsv ...
Bimbo's user avatar
  • 69
0 votes
1 answer
72 views

Why we using async function if then we use await for waiting their response, in this case what's the difference between a syncronus function?
Giackkk's user avatar
  • 121
1 vote
0 answers
68 views

/* I have to use async.eachSeries to insert and validate duplicate data but the library is returning array of objects ,How can I do it Can anyone help */ app.post("/",upload.single(&...
Ayyan Shaikh's user avatar
1 vote
1 answer
2k views

How can you iterate over each value in a Map, in manner where await will be honored in the body of that loop?
Lonnie Best's user avatar
  • 11.6k
2 votes
1 answer
531 views

I'm confused about the order of executing promise.then with async function. The result of that quiz that shows on the console is: 1, a, 2, b, c, d, 3, e. I'm wondering: Why 3 just inserts to between ...
YPChen's user avatar
  • 27
2 votes
0 answers
127 views

How do we strongly type each of the async auto tasks? let's say get_data returns a number and email_link returns a string and I finally want to return the email_link task. I am unable to figure out ...
Nitesh's user avatar
  • 191
2 votes
1 answer
656 views

I'm having a service as follow: public getDoseVignettes() : Observable<DoseVignetteApi> { return this.apollo.watchQuery<Query>({ query: this.VIGNETTE }).valueChanges ....
Hey StackExchange's user avatar
-1 votes
1 answer
45 views

My problem is with creating a database. It is created too late and causes problems with further queries. I tried to use async and await but it seems it doesn't solve the problem. async function ...
deadfish's user avatar
  • 12.3k
0 votes
0 answers
1k views

I'm trying to check if a connection exists after attempting to delete it. At this point the connection has already been deleted and it is now about to start checking once every second for 10 seconds. ...
akremer's user avatar
  • 125
0 votes
3 answers
3k views

I'm working through the guide for discord.js but when I try and set permissions for the slash commands I keep getting the SyntaxError: await is only valid in async functions and the top level bodies ...
random1034623's user avatar
2 votes
0 answers
148 views

I am trying to run a cron job on Heroku which runs daily. The node version this Heroku server/project uses is v9.4. I am also using the async package v2.6.1 When I run the file using node: node dist/...
iamconfusion's user avatar
0 votes
1 answer
69 views

I'm trying to replicate the code in this article: https://depth-first.com/articles/2020/08/24/smiles-validation-in-the-browser/ What I'm trying to do different is that I'm using a textarea instead of ...
Wagyu's user avatar
  • 21
1 vote
0 answers
361 views

I'm receiving this error with the Coalan Async library. Error: (node:2172) UnhandledPromiseRejectionWarning: Error: Callback was already called. Here is my code: const updateOrCreateTrips = (trips, ...
Turkex's user avatar
  • 93
0 votes
2 answers
2k views

So as the title says, I'm playing around with websockets. So far all good, except for the fact that I can't make the page wait until we get a reponse. Now, I do actually have a good reason to do this; ...
ReCore's user avatar
  • 11
0 votes
1 answer
171 views

I am new to node.js and mysql, I asked a similar question before, but my whole server is chaos, so I took sometime improving it. But I got back to the asynchronous problem: How can I handle ...
HappySloth's user avatar
0 votes
0 answers
30 views

I am new to node.js, and I am starting with login and signUp implementation, and I have just found that my database Query of MySQL failed to execute in sequence. So what I do is to find does username ...
HappySloth's user avatar
2 votes
1 answer
221 views

I'm working on an OSS project called pSConfig Web Admin (PWA). The biggest problem we're having is that under load, the generated JSON will occasionally be delivered incomplete (as documented in this ...
Jonukas's user avatar
  • 696
2 votes
1 answer
903 views

I am trying to execute some (several thousand) jobs in "parallel". The problem is each job can potentially contains a request to an external server, requires several MB memory. So just ...
Robert's user avatar
  • 43.4k

1
2 3 4 5
24