junlarsen / league-connect

:electric_plug: Node.js HTTP/1.1, HTTP/2.0 and WebSocket interface to the League of Legends Client APIs
https://www.npmjs.com/package/league-connect
MIT License
156 stars 24 forks source link

error TS2305: Module '"league-connect"' has no exported member 'createHttpSession' #84

Closed TroubledPrawn closed 2 years ago

TroubledPrawn commented 2 years ago

I cloned the project and followed the steps in the example, however I have 2 errors that refer to exported members.

image

I checked the index.js and index.d.ts of the league-connect module to look for where it would be exporting and could not identify or figure out how the 'createHttpSession' and 'createHttp2Request' are being exported.

image

image

Perhaps I have missed something obvious here, but I just wanted to try get the example to work.

junlarsen commented 2 years ago

Hi, are you running 6.0.0-rc5? I think I messed up that build, will investigate

TroubledPrawn commented 2 years ago

Hey thanks for the quick reply! To be honest I dont even know what 6.0.0-rc5 is so I'm assuming I am not running it. Im very new to scripting so that's why I was just trying to get the example to work before trying anything more complicated. I can try set it up if you think I should be using it

junlarsen commented 2 years ago

Oh no problem, could you look inside the package.json file in your project? It should list a version next to league-connect in the dependencies section

I'm in the middle of releasing a new version of LeagueConnect which meams that if you're on version 5.something the examples won't work. Aplogies for the inconvenience, trying to get v6 released soon!

TroubledPrawn commented 2 years ago

For the module package.json it says "version": "5.4.0"

TroubledPrawn commented 2 years ago

Oh but wait in the overall project package.jason it says "version": "6.0.0-rc3",

TroubledPrawn commented 2 years ago

Just to clarify what I mean:

image

for this package it says "version": "6.0.0-rc3"

but within the node_modules that is installed into the example folder when you run yarn install, it installs league-connect module which has a package of "version": "5.4.0"

image

junlarsen commented 2 years ago

Oh that's a mistake, I'll get it fixed with some other issues I've found tonight

TroubledPrawn commented 2 years ago

Amazing thanks! the examples are the best way for me to get something up and running at the moment, then I can try to adapt them. Perhaps you could let me know if using your tool I will be able to grab the game client data for in game events in real time?

junlarsen commented 2 years ago

League Connect only offers what the League Client Ux API has which means it won't get you live game events

TroubledPrawn commented 2 years ago

Ahh okay my mistake, I thought I could grab from the game client api. My goal is to grab live data from pick and ban and then in game events (for broadcast esport situations) I'll have to try another tool then. If you know anything that's set up for this I'd love to know as everything I've seen online is aimed towards post match stats and not at live game events. Thanks for your time!

junlarsen commented 2 years ago

League Client Ux and League Connect will feed you live champion select data over WebSocket but not the ingame events. I think there's an ingame API available, you can ask in the Riot Games Third Party Developers Discord channel, they'll probably know

junlarsen commented 2 years ago

I've pushed a commit that should fix running the example. Can you try pulling down and testing again?