You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varfs=require('fs-extra');fs.copy('/does/not/exist','/something/else',function(err){console.log('error:',err);// error is nested in arrayconsole.log('error stack:',err[0].stack);// message prints but no stack trace});
Why the array nesting? Is it necessary?
Stack trace should be present. Mandatory for debugging.
The text was updated successfully, but these errors were encountered:
For the record, I could have used a stack trace today in debugging an issue with Gatsby. The Gatsby CLI only prints the stack trace attached to the error (which is none in this case). I ended up hacking the Gatsby CLI to print a stack trace for the call site where the error is printed which led me back to the error callback. That ended up being sufficient in my case, but if I needed to know from where the fs.copy was called originally, I would have been out of luck.
Repository owner
locked as off-topic and limited conversation to collaborators
May 20, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
To reproduce:
The text was updated successfully, but these errors were encountered: