← All tasks
javascriptwinstonjs/winston #1584Not a task: already works

Splat is probably broken on latest version (3.2.0)

envgap__winstonjs__winston-1584

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
abf4d2d591c353311f53c1a62325643da51b1be0
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

winstonjs/winston #1584 · read the original issue
### Please tell us about your environment:

  

- _`winston` version?_

   - [ ] `winston@2`

   - [x] `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](https://yarnpkg.com/lang/en/docs/selective-version-resolutions/) on package.json:

```

  "resolutions": {

    "**/triple-beam": "^1.3.0"

  }

```
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]