Closed FruitSnack1 closed 8 months ago
Got TypeError: createLogger is not a function in javascript. Same code works in typescript tho.
TypeError: createLogger is not a function
Code:
import createLogger from 'logging'; const logger = createLogger('FeatureName'); logger.info('Interesting');
logging 3.3.0 nodejs 16.15.1
3.3.0
16.15.1
@FruitSnack1 Instead, try this.
import createLogger from 'logging'; const logger = createLogger.default("FeatureName");
Thanks mate, Its a year late but that fixed it. 😂
Got
TypeError: createLogger is not a function
in javascript. Same code works in typescript tho.Code:
logging
3.3.0
nodejs16.15.1