Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found: Can't resolve 'zlib-sync' with pnpm #9993

Open
m1heng opened this issue Nov 22, 2023 · 1 comment
Open

Module not found: Can't resolve 'zlib-sync' with pnpm #9993

m1heng opened this issue Nov 22, 2023 · 1 comment

Comments

@m1heng
Copy link

m1heng commented Nov 22, 2023

Which package is this bug report for?

discord.js

Issue description

Installed "discord.js" with pnpm in the nextjs project, and had below error

 ⨯ ../../node_modules/.pnpm/@discordjs+ws@1.0.2/node_modules/@discordjs/ws/dist/index.js:561:53
Module not found: Can't resolve 'zlib-sync'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
../../node_modules/.pnpm/discord.js@14.14.1/node_modules/discord.js/src/index.js

Code sample

No response

Versions

"name": "@discordjs/ws" "version": "1.0.2",
"name": "discord.js" "version": "14.14.1",

Issue priority

Medium (should be fixed soon)

Which partials do you have configured?

Not applicable

Which gateway intents are you subscribing to?

Not applicable

I have tested this issue on a development release

No response

@Qjuh
Copy link
Contributor

Qjuh commented Nov 23, 2023

are you trying to run a bot with a persistent gateway connection (which discord.js is) in frontend code? That won't work and leak your token to anyone visiting that website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants