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

Bug: Webpack cant find the Module #6680

Closed
eliteSchwein opened this issue Sep 23, 2021 · 2 comments
Closed

Bug: Webpack cant find the Module #6680

eliteSchwein opened this issue Sep 23, 2021 · 2 comments

Comments

@eliteSchwein
Copy link

eliteSchwein commented Sep 23, 2021

Issue description

  1. code basic bot in typescript
  2. use webpack

Log:

                var e = new Error("Cannot find module '" + req + "'");
                        ^

Error: Cannot find module './mooncord.js'
    at webpackContextResolve (C:\Users\Thomas Ludwig\Documents\coding\mooncord\dist\moonco
rd.js:17096:11)
    at webpackContext (C:\Users\Thomas Ludwig\Documents\coding\mooncord\dist\mooncord.js:1
7091:11)
    at new ActionsManager (C:\Users\Thomas Ludwig\Documents\coding\mooncord\dist\mooncord.
js:14929:114)
    at new Client (C:\Users\Thomas Ludwig\Documents\coding\mooncord\dist\mooncord.js:14200
:20)
    at DiscordClient.<anonymous> (C:\Users\Thomas Ludwig\Documents\coding\mooncord\dist\mo
oncord.js:51641:37)
    at step (C:\Users\Thomas Ludwig\Documents\coding\mooncord\dist\mooncord.js:51614:23)
    at Object.next (C:\Users\Thomas Ludwig\Documents\coding\mooncord\dist\mooncord.js:5159
5:53)
    at fulfilled (C:\Users\Thomas Ludwig\Documents\coding\mooncord\dist\mooncord.js:51586:
58) {
  code: 'MODULE_NOT_FOUND'
}

Codesample

import * as Discord from 'discord.js'

console.log(new Discord.Client({intents: []}))

discord.js version

13.1.0

Node.js version

16.6.2

Operating system

Windows 10

Priority this issue should have

Medium (should be fixed soon)

Which partials do you have configured?

No Partials

Which gateway intents are you subscribing to?

GUILDS

I have tested this issue on a development release

No response

@iCrawl
Copy link
Member

iCrawl commented Sep 23, 2021

We don't really support webpack and neither would a bot be able to be run in a browser.

@iCrawl iCrawl closed this as completed Sep 23, 2021
@eliteSchwein
Copy link
Author

i use webpack to compress it, i dont run it via browser

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

No branches or pull requests

2 participants