question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Converter somehow breaks process events / stacktracing

See original GitHub issue

I am using version 2.8.3 and, after requiring the module, somehow the events and error stack traces break. I can’t listen to process events anymore and the stack trace is not there.

node version: v12.6.0

Steps to reproduce:

const Converter = require('api-spec-converter');
process.on('exit', () => {
  console.log('exit');
});
throw new Error('error');

expected output:

exit
/path/to/script.js:40
throw new Error('error');
^

Error: error
    at Object.<anonymous> (/path/to/script.js:40:7)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:643:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
    at internal/main/run_main_module.js:17:11

current:

/path/to/dir/node_modules/drafter.js/lib/drafter.nomem.js:1
((function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.drafter=f()}}))((function(){var module;var Module;if(!Module){Module={}}Module["ready"]=false;Module["log"]=(function(text){console.log("drafter.js: "+text)});Module["logErr"]=(function(text){console.error("drafter.js: "+text)});Module["onRuntimeInitialized"]=(function(){this.ready=true});var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["EN

Error: error

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rbrencommented, Jul 24, 2019

Yup, I think adding drafter as optional is perfectly fine, since it’s only used by APIBP

0reactions
rbrencommented, Jul 24, 2019

That’d be great, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to automatically generate a stacktrace when my program ...
When my C++ program crashes I would like it to automatically generate a stacktrace. My program is being run by many different users...
Read more >
Missing stack trace when exception occurs during ... - GitHub
Missing the stack trace for the error if it bubbles up from a OneTimeSetUp method. ... I have forked vs-adapter and I'm looking...
Read more >
Printing a Stack Trace with MinGW
Here are the steps required to print out a stacktrace on Windows using MinGW: Walk the stack using the StackWalk64 API to print...
Read more >
Streams FAQ | Confluent Documentation
In other words, if processing an event record as of some time in the past (e.g., during a bootstrapping phase that is processing...
Read more >
Reactor 3 Reference Guide
Reactor also supports non-blocking inter-process communication with the ... To execute these tasks, we need to convert the list to an array.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found