update I ran this code in powershell "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted"
and now i can yarn install, i deleted node modules and reinstalled them with yarn install which gave me this error
C:\Users\xxx\Desktop\Discord bot 5.0\events\Player\error.js:6
.setAuthor({name: `Bot had an unexpected error, please check the console imminently!`, iconURL: track.thumbnail})
PS C:\Users\xxx\Desktop\Discord bot 5.0> yarn install
yarn install v1.22.21
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
[1/3] ⠂ @discordjs/opus
[2/3] ⠂ ffmpeg-static
error C:\Users\xxx\Desktop\Discord bot 5.0\node_modules\@discordjs\opus: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: C:\Users\xxx\Desktop\Discord bot 5.0\node_modules\@discordjs\opus
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | win32 | x64
node-pre-gyp info check checked for "C:\Users\David\Desktop\Discord bot 5.0\node_modules\@discordjs\opus\prebuild\node-v115-napi-v3-win32-x64-unknown-unknown\opus.node" (not found)
node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.9.0/opus-v0.9.0-node-v115-napi-v3-win32-x64-unknown-unknown.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.9.0/opus-v0.9.0-node-v115-napi-v3-win32-x64-unknown-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for @discordjs/[email protected] and [email protected] (node-v115 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.9.0/opus-v0.9.0-node-v115-napi-v3-win32-x64-unknown-unknown.tar.gz
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd clean' (Error: spawn node-gyp.cmd ENOENT)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\xxx\Desktop\Discord bot 5.0\node_modules\@discordjs\node-pre-gyp\lib\util\compile.js:79:20)
node-pre-gyp ERR! stack at ChildProcess.emit (node:events:514:28)
node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12)
node-pre-gyp ERR! stack at onErrorNT (node:internal/child_process:484:16)
node-pre-gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
node-pre-gyp ERR! System Windows_NT 10.0.19045
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xxx\\Desktop\\Discord bot 5.0\\node_modules\\@discordjs\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\xxx\Desktop\Discord bot 5.0\node_modules\@discordjs\opus
node-pre-gyp ERR! node -v v20.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.4.5
node-pre-gyp ERR! not ok
and i still get the same error when trying to play a song