Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodeInternals() does not include matchers for node: #54

Closed
SimenB opened this issue Oct 20, 2020 · 0 comments
Closed

nodeInternals() does not include matchers for node: #54

SimenB opened this issue Oct 20, 2020 · 0 comments

Comments

@SimenB
Copy link

SimenB commented Oct 20, 2020

const StackUtils = require('stack-utils');

const stack = new StackUtils();

const cleaned = stack.clean(`
    at ChannelWrap.emitInitNative (internal/async_hooks.js:136:43)
    at new Resolver (internal/dns/utils.js:23:20)
    at internal/dns/utils.js:101:23
    at NativeModule.compile (internal/bootstrap/loaders.js:285:5)
    at nativeModuleRequire (internal/bootstrap/loaders.js:192:14)
    at dns.js:38:5
    at NativeModule.compile (internal/bootstrap/loaders.js:285:5)
    at NativeModule.compileForPublicLoader (internal/bootstrap/loaders.js:220:8)
    at loadNativeModule (internal/modules/cjs/helpers.js:23:9)
    at Function.Module._load (internal/modules/cjs/loader.js:694:15)
    at processTicksAndRejections (node:internal/process/task_queues:93:5)
`);

console.log(cleaned);

Expected result:

''

Received result:

processTicksAndRejections (node:internal/process/task_queues:93:5)

Workaround:

const stack =  new StackUtils({
  internals: StackUtils.nodeInternals().concat(/\s*\(node:/);
});

nodejs/node#35498

richardlau added a commit to richardlau/stack-utils that referenced this issue Oct 20, 2020
richardlau added a commit to richardlau/stack-utils that referenced this issue Oct 20, 2020
richardlau added a commit to richardlau/stack-utils that referenced this issue Oct 20, 2020
richardlau added a commit to richardlau/stack-utils that referenced this issue Oct 20, 2020
@isaacs isaacs closed this as completed in ec0a544 Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant