Questions tagged as 'promesas'

1
answer

Promises with node.js

Hi, I have this problem with a node.js code. The idea of the code is to copy a file inside the server, but for some reason the file information is not transmidite as a parameter to the next promise. Here you have the code I hope you can help me:...
asked by 16.10.2018 / 02:39
2
answers

Return of a promise then () for each element of an array

When loading the page filled an array with a $ .each and one of the values is an id of a parameter and I need to draw based on that id the description to show in a table, I have the function that returns the description but I can not load it to...
asked by 14.08.2018 / 21:19
1
answer

What are the advantages of using promises in Javacript with respect to using other forms like the one I expose here?

function chuleriaClass(eL0) { this.errorStr = ""; this.then = function (eL1) { console.log("then "); eL1(this); return this; }; this.error = function (f) { if (this.errorStr != "") { f(t...
asked by 12.09.2018 / 23:11
2
answers

Observables, promises are driving me crazy

I have a small code where I read a json to get the current online version of my data the idea is then compare with the local version saved with sqlite and if it is smaller then download the rest of json and update my BD. this.ht...
asked by 06.06.2018 / 00:08
1
answer

Promise in a vuex action does not work when trying to handle the http request error

Hello, I am developing an application in Vue.js, Nativescript and Vuex , when making an ajax request in an action return a promise to handle asynchrony the problem is that when an error is generated this It is not captured at the moment of call...
asked by 17.09.2018 / 20:55
1
answer

Return .done s string in a Jquery Ajax response

I have the following code: function GET_URLAsync(strUrl, aParm) { var response = $.ajax({ type: "POST", url: "../Paginas/" + strUrl, data: JSON.stringify(aParm), contentType: "application/json; charset=utf-...
asked by 19.07.2017 / 22:26
1
answer

Return a promise that contains an array with data from other promises

I am setting up a function in expresJS that using two simple functions execute two SQL queries using Knex to two different databases, but it must return as a response a promise. function qDB1(status_id) { return KnexDB1 .select() .from('...
asked by 18.01.2017 / 05:07
1
answer

Promises with NodeJS

I have an array of stores which by promises I try to obtain the schedule of each, but in some cases I get the following error:    UnhandledPromiseRejectionWarning: TypeError: Can not read property   'length' of undefined       at control_home...
asked by 26.11.2018 / 04:34
1
answer

doubt with the result of a fix

I have a question about the result of an arrangement that I believe in an iteration and I do not know why the code is the following: This piece of code is an object which I will use to dynamically manage a direction that I will bring with the fu...
asked by 22.11.2018 / 23:36
0
answers

Error updating sequelize 4.40 in my project

I am developing a platform in which I updated sequelize to version 4.40 and it tells me the following error.    error: TypeError: Can not read property 'name' of undefined       at Function._validateIncludedElement (C: \ Users \ Zrismart23 \...
asked by 29.10.2018 / 18:34