Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript compilation fails. Cannot find module express-winston #123

Open
ValeriyDP opened this issue Nov 21, 2016 · 2 comments
Open

TypeScript compilation fails. Cannot find module express-winston #123

ValeriyDP opened this issue Nov 21, 2016 · 2 comments

Comments

@ValeriyDP
Copy link

server/lib/logger.ts(3,33): error TS2307: Cannot find module 'express-winston'.

Solved with const expressWinston = require('express-winston');

But I believe that this has to be added to http://definitelytyped.org/

Thanks

@rosston
Copy link
Collaborator

rosston commented Nov 26, 2016

Took me a little bit, but I think I get it. Are you saying that you expect to be able to do

import expressWinston from 'express-winston';

and instead have to do

const expressWinston = require('express-winston');

?

I'm open to a PR for a .d.ts file in this project (looks like you can do it in project, as here: http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html). Or anyone could do it on http://definitelytyped.org.

This is something I might end up getting to myself, but it won't be my highest priority, considering that it does work with a require (and the usage for this module is so limited that the lack of types won't much influence the rest of your application).

@lomby92
Copy link

lomby92 commented Jan 4, 2018

I'm using TypeScript and my app works with:

import * as expressWinston from 'express-winston'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants