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
When using debug-next (v0.3.0) with Bun runtime (v1.1.30), logging functionality doesn't work as expected. The logger initialization works in the main application file but fails to properly log in other modules/routes.
import{Log}from'debug-next'const{ log }=Log()log('Test message')// This fails to output
Current Behavior
Logging works in the main application file where LogBase is initialized
Logging fails silently in other modules/route files
No error messages are shown
Environment variables (DEBUG=app-name:*) are properly set
Expected Behavior
Logging should work consistently across all files
File paths should be automatically resolved
Namespace prefixing should work as documented
Attempted Solutions
Tried using different environment configurations:
Setting DEBUG and FORCE_COLOR environment variables
Using different log levels
Attempted to use ts-node-dev and nodemon as alternatives
Tried various logger initialization approaches
Impact
This issue prevents proper debugging and monitoring in production environments when using Bun as the runtime. Currently requires falling back to Node.js for development to maintain logging functionality.
Additional Context
The issue appears to be related to how Bun handles module resolution and global state management differently from Node.js. The logger initialization state is not properly shared across modules in the Bun environment.
The text was updated successfully, but these errors were encountered:
Jajared
changed the title
Package incompatibility with Bun runtime
Package incompatibility with Bun runtime and Docker
Feb 13, 2025
Description
When using debug-next (v0.3.0) with Bun runtime (v1.1.30), logging functionality doesn't work as expected. The logger initialization works in the main application file but fails to properly log in other modules/routes.
Environment
Steps to Reproduce
Current Behavior
Expected Behavior
Attempted Solutions
Impact
This issue prevents proper debugging and monitoring in production environments when using Bun as the runtime. Currently requires falling back to Node.js for development to maintain logging functionality.
Additional Context
The issue appears to be related to how Bun handles module resolution and global state management differently from Node.js. The logger initialization state is not properly shared across modules in the Bun environment.
The text was updated successfully, but these errors were encountered: