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
Not sure if paths changed since previous Node versions, or if this method was only intended to include specific files but it doesn't seem to be working the way I would expect this to work.
For example, I would consider the internal/modules/cjs/loader.js file to be a Node file since I didn't create it but even when I set up this basic script, the trace still shows that file:
constPrettyError=require('pretty-error');constpe=newPrettyError();pe.skipNodeFiles();pe.start();console.log(processs.cwd())// misspelled to cause error
I'm pretty sure that this is because the nodePaths.coffee references exact filenames, and the relevant code is just using indexOf to check if the stack path is a "Node" file.
I'll add that I'm making a lot of assumptions here, so apologies if I'm misunderstanding the skipNodeFiles method or anything else.
Thanks for all the work on the project so far!
The text was updated successfully, but these errors were encountered:
I've worked around this by setting some node:internal paths independently:
pe.skipPath('node:internal/main/run_main_module')pe.skipPath('node:internal/modules/cjs/helpers')pe.skipPath('node:internal/modules/cjs/loader')pe.skipPath('node:internal/modules/run_main')// etc.
Not sure if paths changed since previous Node versions, or if this method was only intended to include specific files but it doesn't seem to be working the way I would expect this to work.
For example, I would consider the
internal/modules/cjs/loader.js
file to be a Node file since I didn't create it but even when I set up this basic script, the trace still shows that file:Console Output
I'm pretty sure that this is because the
nodePaths.coffee
references exact filenames, and the relevant code is just using indexOf to check if the stack path is a "Node" file.I'll add that I'm making a lot of assumptions here, so apologies if I'm misunderstanding the
skipNodeFiles
method or anything else.Thanks for all the work on the project so far!
The text was updated successfully, but these errors were encountered: