Unable to import a component from a file to another
Hi, i'm trying to get a select menu exported in a file in order to use it in another one by importing it but i get this error (i tried with buttons and i got the same thing):
When the function is in the same file i don't get the issue
The func is :
and i call it like this with the good import:
When the function buildSelectMenu is in the same file, i dont get this error
I'm using
Typescript 5.1.6
and djs v14.11.0
8 Replies
- 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 OPI'm not entirely sure if it's an issue with the build func from djs or just something wrong in my code, sorry if it's the latter
#other-js-ts for non djs related issues (or #useful-servers)
So definitly not djs related ?
exporting a function in ts doesnt seem djs to me though
yeah i agree with you, but i get the issue with this type of export only, whenever i use a builder and export it i get the error
but you arent exporting a builder, you are exporting a function (that returns a builder which is irrelevant)
I'll move this to #other-js-ts, sorry
!close