Rantanen / node-opus

Opus bindings for Node.js
MIT License
79 stars 32 forks source link

Error on installition #53

Closed TheOTNN closed 4 years ago

TheOTNN commented 6 years ago

I would like to handle this situation by myself and not to bother others but i couldn't. I have reinstalled visual studio and have python2.7 correctly put on a path.

gyp ERR! build error gyp ERR! stack Error: msbuild failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12) gyp ERR! System Windows_NT 10.0.17134 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\WINDOWS\system32\node_modules\node-opus gyp ERR! node -v v10.3.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json' npm WARN opus.js@0.1.1 requires a peer of ogg.js@~0.1.0 but none is installed. You must install peer dependencies yourself. npm WARN system32 No description npm WARN system32 No repository field. npm WARN system32 No README data npm WARN system32 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: speaker@0.3.1 (node_modules\speaker): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: speaker@0.3.1 install: node-gyp rebuild npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-opus@0.3.0 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-opus@0.3.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: npm ERR! C:\Users\Orkun\AppData\Roaming\npm-cache_logs\2018-05-31T00_58_01_742Z-debug.log

I also got an error saying: C:\WINDOWS\system32\node_modules\node-opus\build\deps\libopus.vcxproj(20,3): error MSB4019: Imported "C:\Microsoft.Cpp.Default.props" project can not be found, correct . Before that it wanted me to correct something else and when i corrected that (at least i guess so) it popped this. And before that it has also wanted me to correct something about Visual Studio which led me to reinstall it.

Rantanen commented 6 years ago

Have you installed the windows build tools metapackage?

https://www.npmjs.com/package/windows-build-tools

TheOTNN commented 6 years ago

Used to have it installed but then i remove it to recycle bin because it was not working then tried to reinstall but it fails to. I also opened an issue for that and will see if they can help. So basically you mean that problem might occur because i don't have that package?

Rantanen commented 6 years ago

That package is a meta package that installs the Windows build chain. C++ copiler, Python, etc. It should be all you need on a fresh PC - however in some cases a pre-existing Visual Studio will complicate things as it will take priority over the C++ compiler that windows build tools installs (or windows-build-tools doesn't install one if it detects VS; Not sure).

The one peculiarity I see in the logs is that you are trying to install this under C:\WINDOWS\system32\. There is a chance some file system permissions become problematic; Even if I can't see anything related to that in the log. Have you tried installing this in a separate folder that does not require special admin permissions to write to?

TheOTNN commented 6 years ago

Would i sound too silly if i say that i don't know how to change the installation location? All i do is copying and pasting those '' npm'' install words to cmd or powershell (With the power of admin). The thing i wanted to do was to have a discord bot that play an audio file from my pc and that desire of mine created a huge problem for me in order to achieve my goal which is so sad and annoying.

Rantanen commented 6 years ago

The npm install will install the package under the current folder - so you can change the installation location by running the npm install command in some other folder than the Windows\System32 that the admin command prompt defaults to.

Recommend you create a folder for your project and do try it there.

TheOTNN commented 6 years ago

windows-build-tools@3.0.0 postinstall C:\Users\Orkun\AppData\Roaming\npm\node_modules\windows-build-tools node ./dist/index.js

npm ERR! code ELIFECYCLE npm ERR! errno 3221225725 npm ERR! windows-build-tools@3.0.0 postinstall: node ./dist/index.js npm ERR! Exit status 3221225725 npm ERR! npm ERR! Failed at the windows-build-tools@3.0.0 postinstall 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: npm ERR! C:\Users\Orkun\AppData\Roaming\npm-cache_logs\2018-06-03T02_58_53_336Z-debug.log

Seems like none changed. Aren't there any other way to get this opus engine running by any chance? Opened up a new folder at driver C and run PowerShell at there, result is dissappointing.

renarin-kholin commented 5 years ago

im having the same problem

Rantanen commented 4 years ago

I'm archiving the repository for lack of interest in maintaining it. Sorry I never got to deal with this issue. Please see @discordjs/opus for an alternative implementation that is based this project but uses more stable Node.js module technology that should break less between Node.js versions.