Closed Cowation closed 3 years ago
Thanks for the quick reply. However, I'm not sure how I would go about fixing the issue. Do I need to edit other files before running the installation command?
Thank you very much, this solved my problem.
No problem!
Yikes, when I ran node index.js
to start the bot, I got yet another error. Here's the output:
$ node .
C:\Users\knoddy\Desktop\ogs-bot\node_modules\bindings\bindings.js:135
throw err;
^
Error: Could not locate the bindings file. Tried:
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\build\node_expat.node
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\build\Debug\node_expat.node
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\build\Release\node_expat.node
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\out\Debug\node_expat.node
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\Debug\node_expat.node
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\out\Release\node_expat.node
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\Release\node_expat.node
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\build\default\node_expat.node
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\compiled\14.15.5\win32\x64\node_expat.node
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\addon-build\release\install-root\node_expat.node
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\addon-build\debug\install-root\node_expat.node
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\addon-build\default\install-root\node_expat.node
→ C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\lib\binding\node-v83-win32-x64\node_expat.node
at bindings (C:\Users\knoddy\Desktop\ogs-bot\node_modules\bindings\bindings.js:126:9)
at Object.<anonymous> (C:\Users\knoddy\Desktop\ogs-bot\node_modules\node-expat\lib\node-expat.js:4:32)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:\Users\knoddy\Desktop\ogs-bot\node_modules\xml2json\lib\xml2json.js:1:13)
at Module._compile (internal/modules/cjs/loader.js:1063:30) {
tries: [
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\build\\node_expat.node',
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\build\\Debug\\node_expat.node',
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\build\\Release\\node_expat.node',
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\out\\Debug\\node_expat.node',
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\Debug\\node_expat.node',
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\out\\Release\\node_expat.node',
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\Release\\node_expat.node',
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\build\\default\\node_expat.node',
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\compiled\\14.15.5\\win32\\x64\\node_expat.node',
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\addon-build\\release\\install-root\\node_expat.node',
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\addon-build\\debug\\install-root\\node_expat.node',
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\addon-build\\default\\install-root\\node_expat.node',
'C:\\Users\\knoddy\\Desktop\\ogs-bot\\node_modules\\node-expat\\lib\\binding\\node-v83-win32-x64\\node_expat.node'
]
}
I found this solution in StackOverflow, try it and tell me if there's any new error or something.
Thanks for the link. Do you happen to know what parameters I should be using when running node-gyp? I think the thread is talking about some other module.
I don't exactly know, you should go get some info about the modules that you are using, both of that responses were found by me in Bing and StackOverflow
Oh, I just re-ran the commands that you sent before and all of a sudden it worked! I just had to delete my node_modules folder and install the dependencies again. Thanks for the help!
Again, no problem, have a nice day!
Please describe the problem you are having in as much detail as possible:
Recently I cloned the source for one of my Discord bots onto my laptop and downloaded Python along with the Visual Studio C++ build tools. After running
npm install
to install the needed dependencies, I was greeted with a long string of errors in my console.Include a reproducible code sample here, if possible:
Run
npm install @discordjs/opus
on a Windows 10 64-bit machine with the Microsoft Store Python 3.9 package and the Visual Studio 2019 C++ Build Tools.Further details:
Console output: