Cannot find module 'winston'

I wrote a little module that uses winston to log stuff. I used sudo npm install -g winston (it is on a vm...so i'm not too concerned with sudo, etc. Log from npm: [email protected]

How would a human read a json winston log file?

It seems nice for API's, scripts and what not. But reading a winston json stack trace is very hard with a text editor....

node.js Winston - how to safely drain a logger

I have experimented with instantiating and closing winston loggers as (half) described on https://github.com/flatiron/winston#instantiating-your-own-logger, to no avail. I run into trouble closing...

Winston log to file not working

I use Winston for logging: var winston = require('winston'); var logger = new(winston.Logger)({ transports: [ new(winston.transports.Console)(), ...

Object reference not set to an instance of an object in _Layout.cshtml after updated packages

The project was running fine until I updated all NuGet packages via NuGet Manager(I was trying to get the latest OWIN packages). This error is in the _Layout.cshtml and I have not touched on it...

Logging only the message using winston

I am using winston logger in my node app and i want to log my custom message to the log file. var logger = new winston.Logger({ transports: [ new winston.transports.File({ ...

cappedMax not working in winston-mongodb logger in Node.js on Ubuntu

I have created a logger in Node.js using the winston module and added MongoDB transport by requiring winston-mongodb module with the following options: { db: config.db[k.DB_ENV.AUTHOR], ...

NodeJS Express - Global Unique Request Id

Is it possible to define a unique request Id that is included in each log statement without handing the logger to each method/function call? Technologies in use: NodeJS, Express, Winston

Using SQLAlchemy ORM for a non-primary key, unique, auto-incrementing id

When I run the following code, I am expecting the first_name, and last_name to be a composite primary key and for the id to be an autoincrementing index for the row, but not to act as the primary...

get line number and filename for a log output

Is it possible to get the line number and file for each log output ? For example: var winston = require('winston'); winston.log('info', 'some message!'); // this is at line 4 of...

how to configure Ant Design with Webpack 3

Fix and solution: Thanks to @BoyWithSilver, long story short, here are what I did to fix my problems: added .less into extensions section removed unnecessary codes in webpack.config.json e.g....

winston logger not working in nodejs

when logger is being exported to a new file it does not create a log, I have two files 1] abc.js let winston = require('winston');require('winston-logrotate'); var logger = new winston.Logger({ ...

winston saves color formatter in text, how to remove this but still show color?

I am trying to create a logging module using winston as the logging framework. It allows me to specify colors, which is quite nice if the transport is Console, but if I were to define two...

'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'

I am try to convert my electron app to full web. when I am running the app from my localhost I get this error: Failed to load https://agrt.herokuapp.com/login: Response to preflight request...

log json with date and time format with winston node logger

I am trying to log json with winston that includes a timestamp, I have the following configuration: 'use strict'; import * as winston from 'winston'; const LOG = !!process.env.LOG; export const...

How to send a message to a specific discord channel?

Hello I have just started out with creating a discord bot. I have code, that I copied from a tutorial online, which when I enter !play on my discord server anywhere, it will have a bot say...

Docker, MySQL - command not found in .sh file

I'm relatively new to Docker. I just set up a Dockerfile and a docker-compose.yml. And for some reason, docker cannot run this script. Whenever this script is run, it goes through all SQL files...

how to pass a filename to winston logger?

I have winston set up as a logger and it works great. However, I have several processes that I would like to log to different files. How can I pass the filename into a logger instance? I am using...

Getting error: FATAL ERROR: jwtPrivateKey is not defined.'

I'm still having some exception errors about JSON web token Private Key. It says it's not defined but I think I already put the JSON web token private key and still throwing an error. I'm not sure...

winston 'handleExceptions: true' logs twice

There is only one transport, added like this: winston.add(winston.createLogger({ transports: [ new winston.transports.Console({ handleExceptions: true, format:...

Winston logger: set actual caling filename as logging info label

I have a winston logger, and I want to set the filename of the file where the logger is being executed as the label object of the logger info object. e.g: [info]:[callingFileName.js] - 19.06.2019...

'build' is not recognized as an internal or external command - Using ElectronJS / electron-builder

I recently updated my electronJS app to a higher version together with electron-builder. I have no issues running the app with "npm start", however when I try to build it using electron-builder I...

How to configure a winston service with nestjs?

I have a basic nestjs app, I'm trying to use winston as logger service... this breaks my app and I really don't know to fix/revert this. I've tried uninstalling the winston packages, rm...

NestJS swagger-ui-express package is missing after deploy

I am using NestJS version 7.1.0 and serverless and creating api document uses nestjs swagger. In local it's worked like champ but after deploy got error. swagger-ui-express package is missing I...

missing permissions: cant find the cause :discord.js

So after a few minutes when I start my bot, it starts giving errors in my console and I can't seem to find this error causing part in my index.js file. I suspect its in index.js file as it starts...

NestJS - Request scoped service in transient logger

I'm currently trying to extend my logging class in my NestJS (v7) application with a unique request id. When I try to insert my request scoped service in my transient logger, the logger is always...

Yarn Cannot find module 'logform' winston in build

i'm trying to build with Yarn 2 one nodejs application with: "build": "rimraf ./dist && tsc" but i'm...

Using Winston Logger with context NestJS

I am trying to use Winston Logger in my NestJS project combined with "context" from nestjs's Logger. If I directly assign logger when creating NestFactory: const app = await...

How to connect NestJS to New Relic?

I have some difficulties with NestJS and New Relic connection to collect errors from staging or production. I am using following npm packages: winston nest-winston newrelic-winston I can see...

Rename specific columns in excel with pandas

Problem: There are two files. One is a text file with names and the other is an excel file with a list of participants. The excel list also contains names that appear in the text file. In the...