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

Splat is probably broken on latest version (3.2.0) #1584

Closed
1 of 2 tasks
JCMais opened this issue Jan 29, 2019 · 4 comments · Fixed by #1586
Closed
1 of 2 tasks

Splat is probably broken on latest version (3.2.0) #1584

JCMais opened this issue Jan 29, 2019 · 4 comments · Fixed by #1586

Comments

@JCMais
Copy link

JCMais commented Jan 29, 2019

Please tell us about your environment:

  • winston version?
    • winston@2
    • winston@3
  • node -v outputs: v10.8.0
  • Operating System? Windows
  • Language? JS (with yarn)

I had this weird behavior where splat was not working after upgrading Winston, the cause was that logform was using different symbols for SPLAT than Winston.

winston version 3.2.0 specifies version 1.3.0 of triple-beam:
https://github.com/winstonjs/winston/blob/master/package.json#L36

But logform is using version 1.2.0, see:
https://github.com/winstonjs/logform/blob/04a7109031d8ceaf8b93b15d1858d6f05d0a30c1/package.json#L35

This causes different symbols to be used for SPLAT, since they were basically different packages. This was the folder structure after an yarn install:

node_modules/
  logform/
  triple-beam/ (1.2.0)
  winston/
    node_modules/
      triple-beam/ (1.3.0)

And so this line was returning undefined:
https://github.com/winstonjs/logform/blob/04a7109031d8ceaf8b93b15d1858d6f05d0a30c1/splat.js#L36

The workaround was to set package resolution on package.json:

  "resolutions": {
    "**/triple-beam": "^1.3.0"
  }
@indexzero
Copy link
Member

Thanks. Will get a bump out for logform.

@indexzero
Copy link
Member

Fixed in [email protected]

@JCMais
Copy link
Author

JCMais commented Jan 29, 2019

Thanks for the super fast fix @indexzero

@kibertoad
Copy link
Contributor

@indexzero Created a PR that bumps dependencies, including logform.

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

Successfully merging a pull request may close this issue.

3 participants