codeoverflow-org / nodecg-io

A NodeCG-bundle which implements Social Media API's in the NodeCG framework
https://nodecg.io
MIT License
108 stars 26 forks source link

Bundles using Reddit service fail to compile #453

Closed hlxid closed 2 years ago

hlxid commented 2 years ago

Description

Newly generated bundles that use the reddit service currently fail to compile. The odd thing is that it does not affect the sample bundle which still builds fine.

How to reproduce

  1. Create a fresh nodecg install and install nodecg-io (current main or 0.2)
  2. Generate a new bundle that uses the reddit service using nodecg-io generate
  3. Bundle fails to compile with the error below

Error Log

Compile failure:

``` > tsc -b node_modules/reddit-ts/src/RedditAPI.ts:185:25 - error TS2345: Argument of type 'Child | undefined' is not assignable to parameter of type 'Child'. Type 'undefined' is not assignable to type 'Child'. 185 return map_search(data.children[0]) ~~~~~~~~~~~~~~~~ Found 1 error. ```
hlxid commented 2 years ago

And this happens when you pfusch and forget about it... :facepalm:

https://github.com/codeoverflow-org/nodecg-io/blob/207bef35e9fa483a00a001e6edced9ac7a6b95f7/services/nodecg-io-reddit/tsconfig.json#L3-L7