Module Not Found errors, trying to use @discordjs/core v0.6.0 with nextjs v13.4.6
A totally fresh project, I assume nextjs and @discordjs/core might be having some conflicts, but I don't find zlib-sync to be a common dep b/w next.js so I don't thing thats a valid reason.
error
Home Page (and the only page using @discordjs/core)
npm ls
Minimum reproducible code
npx create-next-app@latest
the image has the options setted while configuring the next-app
npm i @discordjs/core
paste this in /app/page.tsx
5 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.node version is v20.3.0, forgot to mention
I don't know what is the http-only version, but simply I just want to deal with setting and getting ApplicationCommands, both guild and global commands
http-only doesn't seem be a valid directory
and @discordjs/core/dist/http-only which exists doesn't export a package
I'm sharing my tsconfig and package.json too, if this might be the missing key
while trying to import api
ts throws the error
Ok so I realised that it indeed export http-only, it's just that there are no types exported with it
this js code works in a completely new project (only @discordjs/core installed), though it doesn't throw any Module-Not-Found Errors without using http-only
uh really really really sorry for the annoyance, restarting ts-server fixed..
also wanted to ask one more thing, I want to use CLIENT_ID and CLIENT_SECRET only for retrieving global/guild commands? can I initiate the REST client without token
nvm figured it
THANKS THOUGH!!!!!!!!!!!!!!!!!!!!!!!!
I restarted the ts server with no fix, I have updated the core install to 1.0.1 to ensure REST is updated for commands.
any insight into fixes from the create-bot solution?
default utils from repo template
for now, I asked chatGPT to fix it by not using https-only
not sure how the library works or if this even works as GPT is cancer
please correct me if its wrong
A) because this is the most recent and ONLY conversation with https-only in a ts environment
B) from 'npm create discord-bot' with typescript
there are no typings being detected from https-only and so running tsc throws the same error as above
the entire point of forums is to categorize and discuss on particular issues compared to standard conversation threads.