No types for @discordjs/core/http-only

so @discordjs/core/http-only isn't giving any type declarations for some reason. easy workaround is to just import the types manually and use them when needed (as shown in the code snippet), but i just wanted to check if this was a known issue
No description
21 Replies
d.js toolkit
d.js toolkit14mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
mikaela
mikaelaOP14mo ago
package version: 1.0.1 node version: 19.3.0
mikaela
mikaelaOP14mo ago
doesn't look like typescript can find any package at all, code works fine though
No description
duck
duck14mo ago
code works fine though
if there are no issues when compiling, it sounds more like an ide issue consider restarting your ts server
mikaela
mikaelaOP14mo ago
nope, same error after restarting ts server
mikaela
mikaelaOP14mo ago
don't know much about exports in package.json files but maybe thats the issue? importing the package normally works fine because of main, module, and typings at the top, but nothing in exports is working
No description
mikaela
mikaelaOP14mo ago
i can always add a ts-ignore to get rid of the type error and just import them manually, but it's not ideal
duck
duck14mo ago
again, if there are no issues when compiling, it sounds more like an ide issue restarting your ts server was just a suggestion that could solve it
mikaela
mikaelaOP14mo ago
well yes, but it could be an issue with the package. i doubt it's a vscode issue anyway
mikaela
mikaelaOP14mo ago
works fine compiling (via nextjs) without the types too
No description
mikaela
mikaelaOP14mo ago
should i make an issue on github?
duck
duck14mo ago
then I'm especially inclined to believe the issue is something local, even if it's not your ide
mikaela
mikaelaOP14mo ago
it might be, i just don't think there's anything else that could be effecting it. i think i saw something like this happening when i was searching if it was a known issue, let me find it again
mikaela
mikaelaOP14mo ago
@duck found it
No description
mikaela
mikaelaOP14mo ago
it can't be local
duck
duck14mo ago
I don't see why that means it can't be local
mikaela
mikaelaOP14mo ago
if it's happening on 2 different devices, possibly on 2 different ide versions too, i doubt it they do seem to be using NextAuth though, i'm in a nextjs project too, so it may be that but again, doubt https://github.com/discordjs/discord.js/issues/9695#issuecomment-1629680669 found another same error
mikaela
mikaelaOP14mo ago
and here
No description
mikaela
mikaelaOP14mo ago
should i make an issue now?
duck
duck14mo ago
well then to address your question about the exports field more directly, the exports field has supported this style of pathing since node 12.16.0 I'm still not sure why you feel this is an issue with the package when your ide is the only thing reporting an issue, typescript has no issues compiling, and there are no issues actually running the code if you really want to make an issue on github, you can, but I'm just telling you the issue is more likely to be local
mikaela
mikaelaOP14mo ago
i wasn't saying it was any issues with the code, i was just wondering if there could have been a mixup with importing the types that's what my question was about and it appears to be a pretty common issue given theres less than 5k npm downloads a month most of which won't be using http-only i'll try messing around with my tsconfig since that's what they went on to do in this
Want results from more Discord servers?
Add your server