Error during building process of server app via winston 3.2
See original GitHub issuePlease tell us about your environment:
- _
winston
version 3.2-
winston@2
-
winston@3
-
- _
node -v
outputs: 11.8.0 or 9.11.1 - Operating System? (macOS)
- Language? (TypeScript 3.2.4)
What is the problem?
I have server and client app written in Typescript. I build all apps to js with webpack 4.29.0. Then I switched to winston 3.2 from winston 3.1 I saw sad error in webpack output:
webpack:///./node_modules/winston-transport/index.js?:4
const Writable = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module 'readable-stream/writable'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
^
Error: Cannot find module 'readable-stream/writable'
at webpackMissingModule (webpack:///./node_modules/winston-transport/index.js?:4:82)
at eval (webpack:///./node_modules/winston-transport/index.js?:4:181)
at Object../node_modules/winston-transport/index.js (/Users/a.malko/Work/raw/build/server.js:4362:1)
at __webpack_require__ (/Users/a.malko/Work/raw/build/server.js:20:30)
at eval (webpack:///./node_modules/winston-transport/legacy.js?:5:25)
at Object../node_modules/winston-transport/legacy.js (/Users/a.malko/Work/raw/build/server.js:4374:1)
at __webpack_require__ (/Users/a.malko/Work/raw/build/server.js:20:30)
at eval (webpack:///./node_modules/winston/lib/winston/logger.js?:16:31)
at Object../node_modules/winston/lib/winston/logger.js (/Users/a.malko/Work/raw/build/server.js:4470:1)
at __webpack_require__ (/Users/a.malko/Work/raw/build/server.js:20:30)
What do you expect to happen instead?
I want winston to be ok 😃
Other information
tsconfig:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"tslib": [
"./node_modules/tslib/tslib.d.ts"
],
"*": [
"src/*"
]
},
"inlineSourceMap": true,
"inlineSources": true,
"module": "commonjs",
"alwaysStrict": true,
"target": "es5",
"pretty": false,
"jsx": "react",
"strict": true,
"strictNullChecks": true,
"noEmitHelpers": true,
"importHelpers": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictPropertyInitialization": false,
"lib": [
"es2016",
"es2017",
"dom"
]
},
"exclude": [
"node_modules"
],
"compileOnSave": false
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:8
Top Results From Across the Web
winston 3.2.1 version is not creating log file - Stack Overflow
In your app.js code, the Winston import is for the npm package and not for the logger object ... Start the server const...
Read more >express-winston - npm
express-winston provides middlewares for request and error logging of your express.js application. It uses 'whitelists' to select properties from the request ...
Read more >How to use the winston.error function in winston - Snyk
Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues...
Read more >Developer Story: Always Bring Receipts - JavaScript in Plain English
My personal strategy for logging activity in NodeJS applications. ... the main critical activity and error logging logic in my application using winston:...
Read more >Slack refusing to start - Ask Ubuntu
After downgrade, running slack from command line no longer outputs [winston] Attempt to write logs with no transports errors after Initializing ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i re-install
npm i winston
afternpm i
and everything works againI have the same problem with yarn on macOS. I am using
yarn workspaces
Winston 3.1 doesn’t work for me. webpack issue?