C# ile Discord botunda Node. yapınca hata veriyor

destinyy

Centipat
Katılım
7 Mart 2021
Mesajlar
232
Daha fazla  
Cinsiyet
Erkek
Merhaba Discord'da Node modules hatası alıyorum. Nasıl cozebilirim?

Kod:
internal/modules/cjs/loader.js:905
 Throw err;
 ^

Error: Cannot find module 'colors'.
Require stack:
- C:\Users\dagha\OneDrive\Desktop\New folder\Bot\index.js
 At function. Module. _resolvefilename (internal/modules/cjs/loader.js:902:15)
 At function. Module. _load (internal/modules/cjs/loader.js:746:27)
 At module. Require (internal/modules/cjs/loader.js:974:19)
 At require (internal/modules/cjs/helpers.js:93:18)
 At object.<anonymous> (C:\Users\dagha\OneDrive\Desktop\New folder\Bot\index.js:1:14)
 At module. _compile (internal/modules/cjs/loader.js:1085:14)
 At Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
 At module. Load (internal/modules/cjs/loader.js:950:32)
 At function. Module. _load (internal/modules/cjs/loader.js:790:12)
 At function. Executeuserentrypoint [as runMain] (internal/modules/run_main.js:76:12) {
 Code: 'module_not_found',
 Requirestack: [ 'C:\\Users\\dagha\\OneDrive\\Desktop\\New folder\\Bot\\index.js' ]
}
 
Son düzenleyen: Moderatör:
C:\Users\dagha\OneDrive\Desktop\New folder\Bot\node_modules\@discordjs\voice\dist\index.js:1
import path from "path";
^^^^^^

SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
at Module._compile (internal/modules/cjs/loader.js:1049:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object.<anonymous> (C:\Users\dagha\OneDrive\Desktop\New folder\Bot\node_modules\distube\dist\core\voice\DisTubeVoice.js:6:17)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
 
Yeni bir klasör açıp index.js(bot.js, app.js, main.js gibi ana komutun bulunduğu dosya)'yi açtığınız yeni klasörün içine taşıyıp baştan modülleri yüklemeyi deneyin.
 
Son düzenleme:
Uyarı! Bu konu 5 yıl önce açıldı.
Muhtemelen daha fazla tartışma gerekli değildir ki bu durumda yeni bir konu başlatmayı öneririz. Eğer yine de cevabınızın gerekli olduğunu düşünüyorsanız buna rağmen cevap verebilirsiniz.

Technopat Haberler

Yeni konular

Geri
Yukarı