node.js - Geting fully qualified path in a nodejs traceback? -


a nodejs (v8?) backtrace can this:

... @ replserver.emit (events.js:95:17) @ replserver.interface._online (readline.js:203:10) 

inside javascript program produces this, how can definitively figure out fully-qualified path given in parenthesis? example, above have events.js or readline.js.

looking @ code nodejs's lib/module.js see there _findpath() function. try:

x = 'events.js' // see traceback above m = require('module'); m._findpath(x, m.globalpaths) 

but guessing here. there better way? thoughts on doing this?

since no other suggestions indicated above, use:

x = 'events.js'; m = require('module'); m._findpath(x, m.globalpaths)


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -