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

不应该强依赖 @tars/winston-tars 扩展的全局 winston #1

Open
Youjingyu opened this issue Jul 15, 2019 · 2 comments
Open

不应该强依赖 @tars/winston-tars 扩展的全局 winston #1

Youjingyu opened this issue Jul 15, 2019 · 2 comments

Comments

@Youjingyu
Copy link
Contributor

Youjingyu commented Jul 15, 2019

@tars/winston-tars 直接在 winston 原型上扩展了 winston.transports,而由于 npm 的版本机制,@tars/logs 目录下可能存在自己的 winston,比如存在如下目录 @tars/logs/node_modules/winston,这时,@tars/logs 使用的是自己目录下的 winston,导致 @tars/winston-tars 拓展的 winston.transports 无效

@Youjingyu Youjingyu changed the title 不应该依赖 winston-tars 扩展的全局 2inston 不应该强依赖 @tars/winston-tars 扩展的全局 winston Jul 15, 2019
@lzhprigrammer
Copy link

very good! It's a very useful tip. I had this problem

@lzhprigrammer
Copy link

How to solve this problem?

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

2 participants