question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: is not assignable to type TransportStream writable missing

See original GitHub issue
error TS2322: Type '(DailyRotateFile | ConsoleTransportInstance)[]' is not assignable to type 'TransportStream | TransportStream[]'.
  Type '(DailyRotateFile | ConsoleTransportInstance)[]' is not assignable to type 'TransportStream[]'.
    Type 'DailyRotateFile | ConsoleTransportInstance' is not assignable to type 'TransportStream'.
      Type 'DailyRotateFile' is not assignable to type 'TransportStream'.
        Property 'writable' is missing in type 'DailyRotateFile'.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sharifzadesinacommented, Nov 8, 2018

@Slessi I have "esModuleInterop": true so the first example is also true. Yes as I told, on the second-way, It works, cause it is a type problem. Also it doesn’t work on third-way, same error. Here the code:

import DailyRotateFile from 'winston-daily-rotate-file';
// or
import DailyRotateFile = require('winston-daily-rotate-file');

var w = winston.createLogger({
  transports: [
    new winston.transports.Console({
      format: winston.format.printf(info => `[app] ${info.level}: ${info.message}`),
      silent: process.env.NODE_ENV === 'production'
    }),
    new DailyRotateFile({
      dirname: path.join(SERVER_PATH, 'storage', 'logs'),
      filename: 'app-%DATE%.log',
      maxFiles: '14d'
    }),
  ],
});
0reactions
mattberthercommented, Nov 8, 2018

Thanks @Slessi. Merged #192 and published as winston-daily-rotate-file@3.5.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type is not assignable to type, Property is missing in type ...
You declared obs as MenuItemKind but you are trying to assign an array of MenuItemKind to it. let obs = {} as MenuItemKind; ......
Read more >
Solved - Type 'x' is not assignable to type 'never' using ...
This error occurs when you have not explicitly given a type to a value. ... The error "Type 'number' is not assignable to...
Read more >
Type is not assignable to type 'OptionalId<T>' - MongoDB
Any ideas? I'm trying to write a Typescript generic using the Nodejs driver v4.1.0. I was using the DefinitelyTyped types so I'm refactoring ......
Read more >
prisma type 'string' is not assignable to type 'never' - You.com
I'm getting a type error when trying to create a course using a schema with many to many relationships. In student.ts whenever I...
Read more >
Viewing online file analysis results for 'explorer.exe'
Not all malicious and suspicious indicators are displayed. Get your own cloud service or the full version to view all details.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found