discordjs / opus

Native opus bindings for node
MIT License
192 stars 55 forks source link

npm install @discordjs/opus installation error Win10 #81

Closed Denoxph closed 3 years ago

Denoxph commented 3 years ago

Can't install @discordjs/opus with npm

Comand: npm install @discordjs/opus

PS C:\Scripte&Programme\Discord Bots\Test> npm install @discordjs/opus

@discordjs/opus@0.5.0 install C:\Scripte&Programme\Discord Bots\Test\node_modules\@discordjs\opus node-pre-gyp install --fallback-to-build

Das System kann den angegebenen Pfad nicht finden. internal/modules/cjs/loader.js:883 throw err; ^

Error: Cannot find module 'C:\@discordjs\node-pre-gyp\bin\node-pre-gyp' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } npm WARN discordbot@1.0.0 No description
npm WARN discordbot@1.0.0 No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @discordjs/opus@0.5.0 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @discordjs/opus@0.5.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Further details:

Denoxph commented 3 years ago

@discordjs/opus version: 0.5.0

iCrawl commented 3 years ago

Error: Cannot find module 'C:@discordjs\node-pre-gyp\bin\node-pre-gyp'

That doesn't look right, but also not really something I can reproduce.

phamleduy04 commented 3 years ago

@Denoxph Did you try to open powershell as admin and run npm i -g windows-build-tools ?

Denoxph commented 3 years ago

yes i did but i got the same result

Denoxph commented 3 years ago

image

I just tried again with the command but its stuck and won't continue.

Denoxph commented 3 years ago

I think i fpund the Problem. When i start npm install he searches for @discordjs in the directory c:/@discordjs. But my discordjs folder is in another folder: "C:\Scripte&Programme\Discord Bots\Discord-Bot\node_modules\@discordjs"

image

can i somehow tell him to use my real @discordjs directory?

kr3mil commented 3 years ago

I had this exact issue, didn't work on my pc but when i tried on my laptop it seemed to work fine. I got this working on my pc by fully uninstalling node and npm, then installing the same version i had on my laptop (node v15.4.0)

iCrawl commented 3 years ago

Yeah this isn't really something I have control over, or can change on a library level.