node:internal/modules/cjs/loader:998 throw err; ^ Error: Cannot find module 'distube' Require stack: - C:\Users\abgz1\OneDrive\Рабочий стол\MusicBot-main\MusicBot-main\bot.js - C:\Users\abgz1\OneDrive\Рабочий стол\MusicBot-main\MusicBot-main\index.js at Module._resolveFilename (node:internal/modules/cjs/loader:995:15) at Module._load (node:internal/modules/cjs/loader:841:27) at Module.require (node:internal/modules/cjs/loader:1061:19) at require (node:internal/modules/cjs/helpers:103:18) at Object.<anonymous> (C:\Users\abgz1\OneDrive\Рабочий стол\MusicBot-main\MusicBot-main\bot.js:2:21) at Module._compile (node:internal/modules/cjs/loader:1159:14) at Module._extensions..js (node:internal/modules/cjs/loader:1213:10) at Module.load (node:internal/modules/cjs/loader:1037:32) at Module._load (node:internal/modules/cjs/loader:878:12) at Module.require (node:internal/modules/cjs/loader:1061:19) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\\Users\\abgz1\\OneDrive\\Рабочий стол\\MusicBot-main\\MusicBot-main\\bot.js', 'C:\\Users\\abgz1\\OneDrive\\Рабочий стол\\MusicBot-main\\MusicBot-main\\index.js' ] } Node.js v18.12.1 Буду рад если кто нибудь знает в чём проблема и как исправить эту ошибку
Эта ошибка говорит о том, что Node.js не может найти модуль distube, который вы пытаетесь использовать в файле bot.js. Чтобы исправить эту ошибку, вам нужно убедиться, что у вас установлен модуль distube и его зависимости. Чтобы установить модуль distube, выполните следующую команду в терминале: npm install distube Code npm install distube Эта команда установит модуль distube и все его зависимости. После этого вы сможете использовать его в своем коде. Если у вас уже установлен модуль distube, но ошибка все равно появляется, то возможно, что его зависимости не установлены. В этом случае вы можете попробовать установить все зависимости с помощью команды: npm install Code npm install Эта команда установит все зависимости, указанные в файле package.json.
k1erry, C:\MusicBot-main\MusicBot-main>npm install distube npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'musicbot-v14@14.4.0', npm WARN EBADENGINE required: { node: '16.x' }, npm WARN EBADENGINE current: { node: 'v18.12.1', npm: '9.2.0' } npm WARN EBADENGINE } npm WARN cleanup Failed to remove some directories [ npm WARN cleanup [ npm WARN cleanup 'C:\\MusicBot-main\\MusicBot-main\\node_modules\\@discordjs\\voice', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\MusicBot-main\MusicBot-main\node_modules\@discordjs\voice\node_modules\discord-api-types'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'C:\\MusicBot-main\\MusicBot-main\\node_modules\\@discordjs\\voice\\node_modules\\discord-api-types' npm WARN cleanup } npm WARN cleanup ] npm WARN cleanup ] npm ERR! code 7 npm ERR! path C:\MusicBot-main\MusicBot-main\node_modules\@discordjs\opus npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@0.4.5 npm ERR! node-pre-gyp info using node@18.12.1 | win32 | x64 npm ERR! node-pre-gyp ERR! UNCAUGHT EXCEPTION npm ERR! node-pre-gyp ERR! stack Error: Cannot find module 'yallist' npm ERR! node-pre-gyp ERR! stack Require stack: npm ERR! node-pre-gyp ERR! stack - C:\MusicBot-main\MusicBot-main\node_modules\lru-cache\index.js npm ERR! node-pre-gyp ERR! stack - C:\MusicBot-main\MusicBot-main\node_modules\semver\classes\range.js npm ERR! node-pre-gyp ERR! stack - C:\MusicBot-main\MusicBot-main\node_modules\semver\classes\comparator.js npm ERR! node-pre-gyp ERR! stack - C:\MusicBot-main\MusicBot-main\node_modules\semver\index.js npm ERR! node-pre-gyp ERR! stack - C:\MusicBot-main\MusicBot-main\node_modules\@discordjs\node-pre-gyp\lib\util\versioning.js npm ERR! node-pre-gyp ERR! stack - C:\MusicBot-main\MusicBot-main\node_modules\@discordjs\node-pre-gyp\lib\install.js npm ERR! node-pre-gyp ERR! stack - C:\MusicBot-main\MusicBot-main\node_modules\@discordjs\node-pre-gyp\lib\node-pre-gyp.js npm ERR! node-pre-gyp ERR! stack - C:\MusicBot-main\MusicBot-main\node_modules\@discordjs\node-pre-gyp\lib\main.js npm ERR! node-pre-gyp ERR! stack - C:\MusicBot-main\MusicBot-main\node_modules\@discordjs\node-pre-gyp\bin\node-pre-gyp npm ERR! node-pre-gyp ERR! stack at Module._resolveFilename (node:internal/modules/cjs/loader:995:15) npm ERR! node-pre-gyp ERR! stack at Module._load (node:internal/modules/cjs/loader:841:27) npm ERR! node-pre-gyp ERR! stack at Module.require (node:internal/modules/cjs/loader:1061:19) npm ERR! node-pre-gyp ERR! stack at require (node:internal/modules/cjs/helpers:103:18) npm ERR! node-pre-gyp ERR! stack at Object.<anonymous> (C:\MusicBot-main\MusicBot-main\node_modules\lru-cache\index.js:4:17) npm ERR! node-pre-gyp ERR! stack at Module._compile (node:internal/modules/cjs/loader:1159:14) npm ERR! node-pre-gyp ERR! stack at Module._extensions..js (node:internal/modules/cjs/loader:1213:10) npm ERR! node-pre-gyp ERR! stack at Module.load (node:internal/modules/cjs/loader:1037:32) npm ERR! node-pre-gyp ERR! stack at Module._load (node:internal/modules/cjs/loader:878:12) npm ERR! node-pre-gyp ERR! stack at Module.require (node:internal/modules/cjs/loader:1061:19) npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.18363 npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\MusicBot-main\\MusicBot-main\\node_modules\\@discordjs\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" npm ERR! node-pre-gyp ERR! cwd C:\MusicBot-main\MusicBot-main\node_modules\@discordjs\opus npm ERR! node-pre-gyp ERR! node -v v18.12.1 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.4.5 npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\abgz1\AppData\Local\npm-cache\_logs\2022-12-25T04_51_45_348Z-debug-0.log C:\MusicBot-main\MusicBot-main>
iddragon4ik, Похоже, что при установке модуля distube возникла ошибка, которая связана с модулем @discordjs/opus. Возможно, это связано с тем, что требуемая версия ноды (16.x) отличается от текущей версии (18.12.1). Чтобы устранить эту ошибку, вам может потребоваться установить требуемую версию ноды. Вы также можете попробовать удалить папку node_modules и снова установить зависимости с помощью команды npm install. Если это не помогает, вы можете попробовать установить модуль distube вручную, указав нужную версию в качестве аргумента: npm install distube@<версия>.