-
Notifications
You must be signed in to change notification settings - Fork 878
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
Programmatic Integration as a transport fails #1735
Comments
Good spot! It seems it does not work from the node.js REPL. Run it from a script. |
Transfered to pino proper because it’s a bug there. |
A PR to fix this would be very welcomed. Supporting the REPL is low priority. |
I am experiencing exact same issue with exact same versions, I run it from code, not from REPL. Is there a way around this?
|
I cannot reproduce it by running as a script. Did you |
I investigated this further and found I was able to fix the immediate problem by modifying the for (const filePath of callers) {
try {
const context = filePath === 'node:repl'
? process.cwd() + path.sep
: filePath
fixTarget = createRequire(context).resolve(origin)
break
} catch (err) {
// Silent catch
continue
}
} If you think this fix is a good one, I can turn it into a PR. I am not sure how to write a unit test for something like this. |
Go ahead and send a PR, we'll chat about the unit test there. |
Hello community, I am using latest node 20.5.1, pino 18.5.0 and pinno-pretty 10.2.0. Here is the snippet for logger. const logger = require('pino') When I am running the package executable which is .exe(created by nexe) I am getting below exception when I run on local the logger works fine. Looking for suggestions. TIA. Error stack trace: SyntaxError: Unexpected token ... |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The Programmatic Integration section currently contains this code example:
The sample currently fails when executed with
[email protected]
and[email protected]
on node 18.16.0:The text was updated successfully, but these errors were encountered: