opened
lofar968
username_0
C:\Users\Thaem\Desktop\Coding projects\lagooner\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! build error
gyp ERR! stack Error: Command failed: reg query "HKLM\Software\Microsoft\MSBuild\ToolsVersions" /s /reg:32
gyp ERR! stack 'reg' is not recognized as an internal or external command,
gyp ERR! stack operable program or batch file.
gyp ERR! stack
gyp ERR! stack Can't find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:134:25
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:218:5)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:192:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:890:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
gyp ERR! System Windows_NT 10.0.10586
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:\Users\Thaem\Desktop\Coding projects\lagooner\node_modules\ref
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm WARN discord.js@11.0.0 requires a peer of erlpack@hammerandchisel/erlpack#master but none was installed.
npm WARN discord.js@11.0.0 requires a peer of opusscript@^0.0.1 but none was installed.
npm WARN discord.js@11.0.0 requires a peer of uws@^0.12.0 but none was installed.
npm WARN lagooner@1.0.0 No description
npm WARN lagooner@1.0.0 No repository field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-opus"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE

npm ERR! ref@1.3.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ref@1.3.4 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ref package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ref
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ref
npm ERR! There is likely additional logging output above.
installation failed
issue
created
Rantanen
username_1
```
gyp ERR! stack Error: Command failed: reg query "HKLM\Software\Microsoft\MSBuild\ToolsVersions" /s /reg:32
gyp ERR! stack 'reg' is not recognized as an internal or external command,
gyp ERR! stack operable program or batch file.
gyp ERR! stack
gyp ERR! stack Can't find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?
```

Do you? :)
comment
created
lofar968
username_0
I have it installed, yes.
comment
created
Rantanen
username_1
Looking more into those 5 lines.. why isn't `reg` a recognized command?

Do you have `system32` in your path?
comment
created
lofar968
username_0
C:\Users\Thaem\Desktop\Coding projects\lagooner\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
build/binding.sln(1): Solution file error MSB5014: File format version is not recognized.  MSBuild can only read solution files between versions 7.0 and 9.0, inclusive.
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:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:192:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.10586
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:\Users\Thaem\Desktop\Coding projects\lagooner\node_modules\ref
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm WARN discord.js@11.0.0 requires a peer of erlpack@hammerandchisel/erlpack#master but none was installed.
npm WARN discord.js@11.0.0 requires a peer of opusscript@^0.0.1 but none was installed.
npm WARN discord.js@11.0.0 requires a peer of uws@^0.12.0 but none was installed.
npm WARN lagooner@1.0.0 No description
npm WARN lagooner@1.0.0 No repository field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-opus"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE

npm ERR! ref@1.3.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ref@1.3.4 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ref package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ref
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ref
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Thaem\Desktop\Coding projects\lagooner\npm-debug.log
comment
created
Rantanen
username_1
Have you checked what kind of a solution file your node-gyp generates?

```
build/binding.sln(1): Solution file error MSB5014: File format version is not recognized. MSBuild can only read solution files between versions 7.0 and 9.0, inclusive.
```

And maybe update Visual Studio. I was a bit surprised it asked for 2008, which is.. you know.. 10 years old. :)
comment
created
lofar968
username_0
Where would I find that file?
My visual studio is 2015 and the msbuildtools are 2013
comment
created
Rantanen
username_1
path-to-node-opus/build/binding.sln

It's generated by node-gyp so it doesn't appear before you try to build node-opus.
comment
created
lofar968
username_0
I don't see the file. Does it delete itself after sometime or something similar?
comment
created
Rantanen
username_1
Actually now that I'm looking at the error message even closer:

```
ref@1.3.4 install C:\Users\Thaem\Desktop\Coding projects\lagooner\node_modules\ref
node-gyp rebuild
```

The error isn't even caused by `node-opus` but [ref](https://github.com/TooTallNate/ref) package instead.

So the bindings.sln is probably located in `node_modules/ref/build`
comment
created
lofar968
username_0
I looked in my node_modules and I couldn't find anything related to ref or the bindings.sln
comment
created
nigilan
username_2
I added system32 in my path and it started working fine!
comment
created
LucasG04
username_3
This issue helped me: https://github.com/nodejs/node-gyp/issues/1754#issuecomment-502210409
comment
closed
Rantanen
username_1
issue
created
Rantanen
username_1
Thanks, hopefully that helps the next person as well. Closing the issue due to inactivity.
comment