neo-async
neo-async copied to clipboard
neo-async/async.js:throwError doesnt display very useful error for all cases.
neo-async/async.js has the throwError
function which is called several times. It will help if this function takes a parameter and shows exactly what error was there.
15 var throwError = function throwError() {
16 throw new Error('Callback was already called.');
17 };
Example, in the following snippet same function is used for different errors.
3828 return function(err, res) {
3829 if (index === null) {
3830 throwError();
3831 }
3832 if (err) {
3833 index = null;
3834 iterate = noop;
3835 callback = once(callback);
3836 callback(err, createArray(result));
3837 return;
3838 }
3839 result[index] = res;
3840 index = null;
3841 if (++completed === size) {
3842 iterate = throwError;
3843 callback(null, result);
3844 callback = throwError;
3845 } else if (sync) {
3846 nextTick(iterate);
3847 } else {
I'm getting the following error but I cant figure out the call stack, if the error message were helpful that'd be great.
Error: Callback was already called.
at throwError (/home/node_modules/neo-async/async.js:16:11)
at /home/node_modules/neo-async/async.js:2818:7
at processTicksAndRejections (internal/process/task_queues.js:79:11)
@hiraditya Thanks for the issue!
Bluebird
and Aigle
have the longStackTrace
feature, so it should be doable.
But it could affect performance, I will investigate it carefully.
Hello, is there any update on this issue?
I'm having the same problem and can't figure out any solution. Anyone?
I've had this issue when using Windows because the path of my folder where I entered was in lower case when the correct name is upper case. It worked when I entered the correct path.
Explanations:
cd myfolder/ npm run build » Error: Callback was already called. cd .. cd MYFOLDER/ npm run build » SUCCESS
I've had this issue when using Windows because the path of my folder where I entered was in lower case when the correct name is upper case. It worked when I entered the correct path.
Explanations:
cd myfolder/ npm run build » Error: Callback was already called. cd .. cd MYFOLDER/ npm run build » SUCCESS
This fixed my issue. I was not able to build with Vue CLI.