I'm trying to debug a nodeJS app. I have some code which causes an error, a variable is undefined. When I run the code normally, the error is very clear and eas
I am part of a small team working on a fairly small website with user accounts; there are about 100 users at this time. And we are using Amazon Cognito for user
Can you make a function wait until a variable is set by another function? This is my example: function setvar(){ //some process that may take
In my Nodejs project I would just like to await a mongoose.save function before continuing with my code. The below example does not work, but can anyone help me
function first(){ console.log('first') } function second(){ console.log('second') } let interval = async ()=>{ await setInterval(first,2000) await se
I have a get fetch request with header having Bearer token, getting 401 unauthorized error, even if the response status condition checked in the then statement,
In redux saga if we want to handle multiple promises, we can use all (which is equivalent of Promise.all): yield all( users.map((user) => call(signUser, u
In my angular app I'm updating from Http to HttpClient, which doesn't seem to work when working with Promises. It seems like you need to use a little 'work-arou
I test the fetch API with jsonplaceholder URL, but my function returns "Promise State: Pending", and I don't understand why : function getUsers(url) { return
This Q&A is aimed to give clear answers to the following questions: What are asynchronous functions in JavaScript and when and how do we use them? What are
I recently started migrating things from jQ to a more structured framework being VueJS, and I love it! Conceptually, Vuex has been a bit of a paradigm shift fo
I'm running my little testsite on localhost (although currently there isn't even serverside interaction yet). Everything worked fine until I restarted my PC. O
My problem is that I don't know how to know when a dynamic promise array has all the promises resolved. Here an example: var promiseArray = []; promiseArray.p
I am trying to insert multiple rows on 2 related tables using sequelize with mysql. Based on sequelize transaction cannot insert because of foreign key? I trie
I'm making a function that permits me to upload a picture to imgur in my express api (nodejs), i'm encoutering an error when calling a function returning a prom
Im am doing nodeschool exercises , the This problem is the same as the previous problem (HTTP COLLECT) in that you need to use http.get(). However, this
I would like to dynamically import a third-party module and check it. Then declaration in NgModule depends on it exist or not(true/false). Something like my cod
I'm trying async/await functionality. I have such code imitating a request: const getJSON = async () => { const request = () => new Promise((resolve, r
I've been digging around, and I'm not able to find references or documentation on how I can use Asynchronous Functions in Google App Script, I found that people
Given the following code: var arr = [1,2,3,4,5]; var results: number[] = await arr.map(async (item): Promise<number> => { await callAsynchron