Having troubles installing depencies with nodejs

Viewed 219

Sup here, i'm actually trying to get a bot work on my vps so as everytime i create my directory etc download the repo from github and follow the instructions But i've got a problem, when i execute npm i in my terminal it return this:

PS C:\Users\vpsngamp\Desktop\crow> npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: discord.js.old@11.6.5
npm ERR! Found: @discordjs/opus@0.7.0
npm ERR! node_modules/@discordjs/opus
npm ERR!   @discordjs/opus@"^0.7.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @discordjs/opus@"^0.1.0" from discord.js.old@11.6.5
npm ERR! node_modules/discord.js.old
npm ERR!   discord.js.old@"^11.6.5" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @discordjs/opus@0.1.0
npm ERR! node_modules/@discordjs/opus
npm ERR!   peerOptional @discordjs/opus@"^0.1.0" from discord.js.old@11.6.5
npm ERR!   node_modules/discord.js.old
npm ERR!     discord.js.old@"^11.6.5" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\vpsngamp\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\vpsngamp\AppData\Local\npm-cache\_logs\2022-06-19T19_23_38_677Z-debug-0.log
PS C:\Users\vpsngamp\Desktop\crow>

So i've tried to do npm i --force or npm i --legacy-peer-deps, and ends up with this :

S C:\Users\vpsngamp\Desktop\crow> npm i --legacy-peer-deps
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes:
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated discord-buttons@4.0.0: New lib is coming! Join our support server for more help: https://discord.gg/KUS5pjyA4J
npm WARN deprecated snekfetch@3.6.4: use node-fetch instead
npm WARN deprecated superagent@6.1.0: Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors
not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>. Thanks to @shadowgate15, @spence-s, and @niftylettuce. Superagent is sponsored by Forward Email at <https://forwardemail.net>.
npm WARN deprecated discord.js@12.5.3: no longer supported
npm WARN deprecated node-opus@0.3.3: This project is unmaintained. See @discordjs/opus for an alternative.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\vpsngamp\\Desktop\\crow\\node_modules\\puppeteer',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\vpsngamp\Desktop\crow\node_modules\puppeteer'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\vpsngamp\\Desktop\\crow\\node_modules\\puppeteer'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\vpsngamp\\Desktop\\crow\\node_modules\\canvas',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\vpsngamp\Desktop\crow\node_modules\canvas'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\vpsngamp\\Desktop\\crow\\node_modules\\canvas'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\vpsngamp\\Desktop\\crow\\node_modules',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\vpsngamp\Desktop\crow\node_modules\puppeteer'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\vpsngamp\\Desktop\\crow\\node_modules\\puppeteer'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\vpsngamp\Desktop\crow\node_modules\node-opus
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.14.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.2 found at "C:\Python310\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2019 (16.11.32126.315) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - missing any VC++ toolset
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack     at C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack     at C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack     at C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack     at C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack     at C:\Users\vpsngamp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:406:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! System Windows_NT 10.0.17763
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\vpsngamp\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\vpsngamp\Desktop\crow\node_modules\node-opus
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\vpsngamp\AppData\Local\npm-cache\_logs\2022-06-19T19_25_05_586Z-debug-0.log
PS C:\Users\vpsngamp\Desktop\crow>

I've tried reading the logs but don't find anything useful, and the output from the second try is strange because i've got VSC and it is updated to the last version

My nodejs version is 16.14.0 and npm is 8.12.2 Thanks in advance

0 Answers
Related