Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install issues and post-installation exceptions on Windows 10 #173

Closed
zavitax opened this issue Jan 25, 2018 · 16 comments
Closed

Install issues and post-installation exceptions on Windows 10 #173

zavitax opened this issue Jan 25, 2018 · 16 comments

Comments

@zavitax
Copy link

zavitax commented Jan 25, 2018

Install fails for me with:

npm install bluetooth-serial-port

  • Running from Developer Command Prompt for VS 2017
  • Python accessible from command line:

Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'bluetooth-serial-port' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 61f152799112b18e
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/bluetooth-serial-port 421ms (from cache)
8 silly pacote tag manifest for bluetooth-serial-port@latest fetched in 489ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 silly install loadShrinkwrap
12 silly install loadAllDepsIntoIdealTree
13 silly resolveWithNewModule [email protected] checking installable status
14 http fetch GET 304 https://registry.npmjs.org/bindings 84ms (from cache)
15 silly pacote range manifest for [email protected] fetched in 88ms
16 silly resolveWithNewModule [email protected] checking installable status
17 http fetch GET 304 https://registry.npmjs.org/nan 235ms (from cache)
18 silly pacote tag manifest for nan@latest fetched in 239ms
19 silly resolveWithNewModule [email protected] checking installable status
20 http fetch GET 304 https://registry.npmjs.org/@types%2fnode 1007ms (from cache)
21 silly pacote range manifest for @types/node@^7.0.10 fetched in 1012ms
22 silly resolveWithNewModule @types/[email protected] checking installable status
23 silly currentTree [email protected]
23 silly currentTree -- [email protected] 24 silly idealTree [email protected] 24 silly idealTree +-- @types/[email protected] 24 silly idealTree +-- [email protected] 24 silly idealTree +-- [email protected] 24 silly idealTree +-- [email protected] 24 silly idealTree -- [email protected]
25 silly install generateActionsToTake
26 silly diffTrees action count 4
27 silly diffTrees add @types/[email protected]
28 silly diffTrees add [email protected]
29 silly diffTrees add [email protected]
30 silly diffTrees add [email protected]
31 silly decomposeActions action count 32
32 silly decomposeActions fetch @types/[email protected]
33 silly decomposeActions extract @types/[email protected]
34 silly decomposeActions preinstall @types/[email protected]
35 silly decomposeActions build @types/[email protected]
36 silly decomposeActions install @types/[email protected]
37 silly decomposeActions postinstall @types/[email protected]
38 silly decomposeActions finalize @types/[email protected]
39 silly decomposeActions refresh-package-json @types/[email protected]
40 silly decomposeActions fetch [email protected]
41 silly decomposeActions extract [email protected]
42 silly decomposeActions preinstall [email protected]
43 silly decomposeActions build [email protected]
44 silly decomposeActions install [email protected]
45 silly decomposeActions postinstall [email protected]
46 silly decomposeActions finalize [email protected]
47 silly decomposeActions refresh-package-json [email protected]
48 silly decomposeActions fetch [email protected]
49 silly decomposeActions extract [email protected]
50 silly decomposeActions preinstall [email protected]
51 silly decomposeActions build [email protected]
52 silly decomposeActions install [email protected]
53 silly decomposeActions postinstall [email protected]
54 silly decomposeActions finalize [email protected]
55 silly decomposeActions refresh-package-json [email protected]
56 silly decomposeActions fetch [email protected]
57 silly decomposeActions extract [email protected]
58 silly decomposeActions preinstall [email protected]
59 silly decomposeActions build [email protected]
60 silly decomposeActions install [email protected]
61 silly decomposeActions postinstall [email protected]
62 silly decomposeActions finalize [email protected]
63 silly decomposeActions refresh-package-json [email protected]
64 silly install executeActions
65 silly doSerial global-install 32
66 verbose correctMkdir C:\Users\ilya7\AppData\Roaming\npm-cache_locks correctMkdir not in flight; initializing
67 verbose lock using C:\Users\ilya7\AppData\Roaming\npm-cache_locks\staging-e092d313b88618f9.lock for C:\Shared\TalkBack\Dev\Bluetooth\node_modules.staging
68 silly doParallel extract 32
69 silly extract @types/[email protected]
70 silly pacote trying @types/node@https://registry.npmjs.org/@types/node/-/node-7.0.52.tgz by hash: sha512-jjpyQsKGsOF/wUElNjfPULk+d8PKvJOIXk3IUeBYYmNCy5dMWfrI+JiixYNw8ppKOlcRwWTXFl0B+i5oGrf95Q==
71 silly extract [email protected]
72 silly pacote trying bindings@https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz by hash: sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=
73 silly extract [email protected]
74 silly pacote trying nan@https://registry.npmjs.org/nan/-/nan-2.8.0.tgz by hash: sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=
75 silly extract [email protected]
76 silly pacote trying bluetooth-serial-port@https://registry.npmjs.org/bluetooth-serial-port/-/bluetooth-serial-port-2.1.5.tgz by hash: sha1-BX3dkMSYzfjRHjqOkADDmLH45XQ=
77 silly pacote bindings@https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz extracted to C:\Shared\TalkBack\Dev\Bluetooth\node_modules.staging\bindings-4ec019bc by content address 84ms
78 silly pacote @types/node@https://registry.npmjs.org/@types/node/-/node-7.0.52.tgz extracted to C:\Shared\TalkBack\Dev\Bluetooth\node_modules.staging@types\node-cc34445d by content address 102ms
79 silly pacote nan@https://registry.npmjs.org/nan/-/nan-2.8.0.tgz extracted to C:\Shared\TalkBack\Dev\Bluetooth\node_modules.staging\nan-7b06c1c8 by content address 160ms
80 silly pacote bluetooth-serial-port@https://registry.npmjs.org/bluetooth-serial-port/-/bluetooth-serial-port-2.1.5.tgz extracted to C:\Shared\TalkBack\Dev\Bluetooth\node_modules.staging\bluetooth-serial-port-6438b315 by content address 160ms
81 silly doReverseSerial unbuild 32
82 silly doSerial remove 32
83 silly doSerial move 32
84 silly doSerial finalize 32
85 silly finalize C:\Shared\TalkBack\Dev\Bluetooth\node_modules@types\node
86 silly finalize C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bindings
87 silly finalize C:\Shared\TalkBack\Dev\Bluetooth\node_modules\nan
88 silly finalize C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port
89 silly doParallel refresh-package-json 32
90 silly refresh-package-json C:\Shared\TalkBack\Dev\Bluetooth\node_modules@types\node
91 silly refresh-package-json C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bindings
92 silly refresh-package-json C:\Shared\TalkBack\Dev\Bluetooth\node_modules\nan
93 silly refresh-package-json C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port
94 silly doParallel preinstall 32
95 silly preinstall @types/[email protected]
96 info lifecycle @types/[email protected]preinstall: @types/[email protected]
97 silly preinstall [email protected]
98 info lifecycle [email protected]
preinstall: [email protected]
99 silly preinstall [email protected]
100 info lifecycle [email protected]preinstall: [email protected]
101 silly preinstall [email protected]
102 info lifecycle [email protected]
preinstall: [email protected]
103 silly doSerial build 32
104 silly build @types/[email protected]
105 info linkStuff @types/[email protected]
106 silly linkStuff @types/[email protected] has C:\Shared\TalkBack\Dev\Bluetooth\node_modules as its parent node_modules
107 verbose linkBins @types/[email protected]
108 verbose linkMans @types/[email protected]
109 silly build [email protected]
110 info linkStuff [email protected]
111 silly linkStuff [email protected] has C:\Shared\TalkBack\Dev\Bluetooth\node_modules as its parent node_modules
112 verbose linkBins [email protected]
113 verbose linkMans [email protected]
114 silly build [email protected]
115 info linkStuff [email protected]
116 silly linkStuff [email protected] has C:\Shared\TalkBack\Dev\Bluetooth\node_modules as its parent node_modules
117 verbose linkBins [email protected]
118 verbose linkMans [email protected]
119 silly build [email protected]
120 info linkStuff [email protected]
121 silly linkStuff [email protected] has C:\Shared\TalkBack\Dev\Bluetooth\node_modules as its parent node_modules
122 verbose linkBins [email protected]
123 verbose linkMans [email protected]
124 silly doSerial global-link 32
125 silly doParallel update-linked 32
126 silly doSerial install 32
127 silly install @types/[email protected]
128 info lifecycle @types/[email protected]install: @types/[email protected]
129 silly install [email protected]
130 info lifecycle [email protected]
install: [email protected]
131 silly install [email protected]
132 info lifecycle [email protected]install: [email protected]
133 silly install [email protected]
134 info lifecycle [email protected]
install: [email protected]
135 verbose lifecycle [email protected]install: unsafe-perm in lifecycle true
136 verbose lifecycle [email protected]
install: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\node_modules.bin;C:\Shared\TalkBack\Dev\Bluetooth\node_modules.bin;C:\Program Files\nodejs;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools;C:\code\depot_tools;C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Microsoft MPI\Bin;C:\ProgramData\Oracle\Java\javapath;c:\Windows\System32\wbem;C:\Local\Programs\Python\Python35\Scripts;C:\Local\Programs\Python\Python35;C:\Program Files (x86)\WinSCP;C:\Program Files\PuTTY;C:\Program Files (x86)\Skype\Phone;C:\Local\Programs\Perl\c\bin;C:\Local\Programs\Perl\perl\site\bin;C:\Local\Programs\Perl\perl\bin;C:\Program Files\dotnet;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Microsoft Emulator Manager\1.0;C:\Program Files (x86)\Common Files\Acronis\SnapAPI;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\tools\go\bin;C:\Program Files (x86)\PDFtk\bin;C:\Program Files\CMake\bin;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Scripts;C:\ProgramData\Anaconda3\Library\bin;C:\Program Files\Git\cmd;C:\Chromium\src\depot_tools;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\Xoreax\IncrediBuild;C:\Program Files\nodejs;C:\Code\depot_tools;C:\Ruby23-x64\bin;C:\Users\ilya7.dnx\bin;C:\Users\ilya7\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\ilya7\AppData\Roaming\Composer\vendor\bin;c:\Program Files\git\bin;C:\local\programs\cmdline;C:\Program Files (x86)\PostgreSQL Frontend\bin;c:\local\Programs\CmdLine;c:\windows\system32;c:\Program Files (x86)\PHP\v5.6;C:\Users\ilya7\AppData\Local\Programs\Fiddler;C:\Users\ilya7\AppData\Local\Microsoft\WindowsApps;C:\tools\mingw64\bin;C:\Chromium\src\depot_tools;C:\Users\ilya7\AppData\Roaming\npm
137 verbose lifecycle [email protected]install: CWD: C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port
138 silly lifecycle [email protected]
install: Args: [ '/d /s /c', 'node-gyp configure build' ]
139 silly lifecycle [email protected]install: Returned: code: 1 signal: null
140 info lifecycle [email protected]
install: Failed to exec install script
141 verbose unlock done using C:\Users\ilya7\AppData\Roaming\npm-cache_locks\staging-e092d313b88618f9.lock for C:\Shared\TalkBack\Dev\Bluetooth\node_modules.staging
142 silly saveTree [email protected]
142 silly saveTree +-- [email protected]
142 silly saveTree | +-- @types/[email protected]
142 silly saveTree | +-- [email protected]
142 silly saveTree | -- [email protected] 142 silly saveTree -- [email protected]
143 warn [email protected] No description
144 warn [email protected] No repository field.
145 verbose stack Error: [email protected] install: node-gyp configure build
145 verbose stack Exit status 1
145 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
145 verbose stack at EventEmitter.emit (events.js:160:13)
145 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
145 verbose stack at ChildProcess.emit (events.js:160:13)
145 verbose stack at maybeClose (internal/child_process.js:943:16)
145 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
146 verbose pkgid [email protected]
147 verbose cwd C:\Shared\TalkBack\Dev\Bluetooth
148 verbose Windows_NT 10.0.16299
149 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "bluetooth-serial-port"
150 verbose node v9.4.0
151 verbose npm v5.6.0
152 error code ELIFECYCLE
153 error errno 1
154 error [email protected] install: node-gyp configure build
154 error Exit status 1
155 error Failed at the [email protected] install script.
155 error This is probably not a problem with npm. There is likely additional logging output above.
156 verbose exit [ 1, true ]

@zavitax
Copy link
Author

zavitax commented Jan 25, 2018

And here's the solution:
https://github.com/nodejs/node-gyp#installation

Namely:

Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).

@zavitax
Copy link
Author

zavitax commented Jan 25, 2018

Unfortunately, when doing this:

const BluetoothSerialPort = require('bluetooth-serial-port');

I get:

C:\Shared\TalkBack\Dev\Bluetooth>node index.js
C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bindings\bindings.js:83
throw e
^

Error: %1 is not a valid Win32 application.
\?\C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\Debug\BluetoothSerialPort.node
at Error (native)
at Object.Module._extensions..node (module.js:597:18)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at bindings (C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bindings\bindings.js:76:44)
at C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\lib\bluetooth-serial-port.js:20:39
at Object. (C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\lib\bluetooth-serial-port.js:137:2)

@zavitax zavitax changed the title Install fails on Windows 10 Install issues and post-installation exceptions on Windows 10 Jan 25, 2018
@eelcocramer
Copy link
Owner

eelcocramer commented Jan 25, 2018

Does the file C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\Debug\BluetoothSerialPort.node exist?

In the FAQ labelled issues you can find information on common Windows installation issues.

@zavitax
Copy link
Author

zavitax commented Jan 25, 2018

The file C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\Release\BluetoothSerialPort.node exists

Note \Release\ as opposed to \Debug\

@eelcocramer
Copy link
Owner

There is your problem. It should be compiled into Release when you use npm install.

@zavitax
Copy link
Author

zavitax commented Jan 25, 2018

It is compiled into Release when I use npm install.

The thing is, that later I opened C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\binding.sln and produced a Debug build as well.

So we've got both C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\Release\BluetoothSerialPort.node produced by npm install, and C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\Debug\BluetoothSerialPort.node

But the issue still exists.

@eelcocramer
Copy link
Owner

Ok, understood. You might want to check if it is compiled as a 32 bits binary (like the error message indicates). You may also want to check if you have the problem with the LTS version of Node (currently v8) instead of v9.

@zavitax
Copy link
Author

zavitax commented Jan 25, 2018

It's compiled as 64-bit binary.

Can you describe how to check for the 2nd part?

@zavitax
Copy link
Author

zavitax commented Jan 25, 2018

After changing build configuration and recompiling as 32-bit (both Debug and Release), I get the following error message:

C:\Shared\TalkBack\Dev\Bluetooth>node index.js
C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bindings\bindings.js:91
throw err
^

Error: Could not locate the bindings file. Tried:
→ C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.node
→ C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\Debug\BluetoothSerialPort.node
→ C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\Release\BluetoothSerialPort.node
→ C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\out\Debug
\BluetoothSerialPort.node
→ C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\Debug\BluetoothSerialPort.node
→ C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\out\Release\BluetoothSerialPort.node
→ C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\Release\BluetoothSerialPort.node
→ C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\build\default\BluetoothSerialPort.node
→ C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\compiled\6.11.1\win32\ia32\BluetoothSerialPort.node
at bindings (C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bindings\bindings.js:88:9)
at C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\lib\bluetooth-serial-port.js:20:39
at Object. (C:\Shared\TalkBack\Dev\Bluetooth\node_modules\bluetooth-serial-port\lib\bluetooth-serial-port.js:137:2)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)

@zavitax
Copy link
Author

zavitax commented Jan 25, 2018

Hm... my apologies. The .node files never get built when platform target is switched to Win32.

Here's the build log for Release build:

1>------ Rebuild All started: Project: BluetoothSerialPort, Configuration: Release Win32 ------
1>Build started 2018-01-25 17:45:34.
1>Target _PrepareForClean:
1> Deleting file "Release\obj\BluetoothSerialPort\Bluetoot.E57CA2BD.tlog\BluetoothSerialPort.lastbuildstate".
1>Target InitializeBuildStatus:
1> Touching "Release\obj\BluetoothSerialPort\Bluetoot.E57CA2BD.tlog\unsuccessfulbuild".
1>Target ClCompile:
1> BluetoothSerialPort.cc
1> DeviceINQ.cc
1> BTSerialPortBinding.cc
1> BluetoothHelpers.cc
1> win_delay_load_hook.cc
1> ..\src\windows\BTSerialPortBinding.cc(190): warning C4996: 'v8::Function::NewInstance': was declared deprecated
1> C:\Users\ilya7.node-gyp\9.4.0\include\node\v8.h(3843): note: see declaration of 'v8::Function::NewInstance'
1> ..\src\windows\DeviceINQ.cc(182): warning C4473: 'sscanf_s' : not enough arguments passed for format string
1> ..\src\windows\DeviceINQ.cc(182): note: placeholders and their parameters expect 2 variadic arguments, but 1 were provided
1> ..\src\windows\DeviceINQ.cc(182): note: the missing variadic argument 2 is required by format string '%18[^)]'
1> ..\src\windows\DeviceINQ.cc(182): note: this argument is used as a buffer size
1> ..\src\windows\DeviceINQ.cc(412): warning C4473: 'sscanf_s' : not enough arguments passed for format string
1> ..\src\windows\DeviceINQ.cc(412): note: placeholders and their parameters expect 2 variadic arguments, but 1 were provided
1> ..\src\windows\DeviceINQ.cc(412): note: the missing variadic argument 2 is required by format string '%18[^)]'
1> ..\src\windows\DeviceINQ.cc(412): note: this argument is used as a buffer size
1> ..\src\windows\DeviceINQ.cc(413): warning C4473: 'sscanf_s' : not enough arguments passed for format string
1> ..\src\windows\DeviceINQ.cc(413): note: placeholders and their parameters expect 2 variadic arguments, but 1 were provided
1> ..\src\windows\DeviceINQ.cc(413): note: the missing variadic argument 2 is required by format string '%18[^)]'
1> ..\src\windows\DeviceINQ.cc(413): note: this argument is used as a buffer size
1>Done building target "ClCompile" in project "BluetoothSerialPort.vcxproj".
1>Target Link:
1> node.lib(node.exe) : fatal error LNK1190: invalid fixup found, type 0x0003
1>Done building target "Link" in project "BluetoothSerialPort.vcxproj" -- FAILED.
1>
1>Done building project "BluetoothSerialPort.vcxproj" -- FAILED.
1>
1>Build FAILED.
1>
1>..\src\windows\BTSerialPortBinding.cc(190): warning C4996: 'v8::Function::NewInstance': was declared deprecated
1>..\src\windows\DeviceINQ.cc(182): warning C4473: 'sscanf_s' : not enough arguments passed for format string
1>..\src\windows\DeviceINQ.cc(412): warning C4473: 'sscanf_s' : not enough arguments passed for format string
1>..\src\windows\DeviceINQ.cc(413): warning C4473: 'sscanf_s' : not enough arguments passed for format string
1>node.lib(node.exe) : fatal error LNK1190: invalid fixup found, type 0x0003
1> 4 Warning(s)
1> 1 Error(s)
1>
1>Time Elapsed 00:00:04.33
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Here's the same for Debug build:

1>------ Rebuild All started: Project: BluetoothSerialPort, Configuration: Debug Win32 ------
1>Build started 2018-01-25 17:46:40.
1>Target _PrepareForClean:
1> Deleting file "Debug\obj\BluetoothSerialPort\Bluetoot.E57CA2BD.tlog\BluetoothSerialPort.lastbuildstate".
1>Target InitializeBuildStatus:
1> Touching "Debug\obj\BluetoothSerialPort\Bluetoot.E57CA2BD.tlog\unsuccessfulbuild".
1>Target ClCompile:
1> BluetoothSerialPort.cc
1> DeviceINQ.cc
1> BTSerialPortBinding.cc
1> BluetoothHelpers.cc
1> win_delay_load_hook.cc
1> ..\src\windows\DeviceINQ.cc(182): warning C4473: 'sscanf_s' : not enough arguments passed for format string
1> ..\src\windows\DeviceINQ.cc(182): note: placeholders and their parameters expect 2 variadic arguments, but 1 were provided
1> ..\src\windows\DeviceINQ.cc(182): note: the missing variadic argument 2 is required by format string '%18[^)]'
1> ..\src\windows\DeviceINQ.cc(182): note: this argument is used as a buffer size
1> ..\src\windows\DeviceINQ.cc(412): warning C4473: 'sscanf_s' : not enough arguments passed for format string
1> ..\src\windows\DeviceINQ.cc(412): note: placeholders and their parameters expect 2 variadic arguments, but 1 were provided
1> ..\src\windows\DeviceINQ.cc(412): note: the missing variadic argument 2 is required by format string '%18[^)]'
1> ..\src\windows\DeviceINQ.cc(412): note: this argument is used as a buffer size
1> ..\src\windows\DeviceINQ.cc(413): warning C4473: 'sscanf_s' : not enough arguments passed for format string
1> ..\src\windows\DeviceINQ.cc(413): note: placeholders and their parameters expect 2 variadic arguments, but 1 were provided
1> ..\src\windows\DeviceINQ.cc(413): note: the missing variadic argument 2 is required by format string '%18[^)]'
1> ..\src\windows\DeviceINQ.cc(413): note: this argument is used as a buffer size
1> ..\src\windows\BTSerialPortBinding.cc(190): warning C4996: 'v8::Function::NewInstance': was declared deprecated
1> C:\Users\ilya7.node-gyp\9.4.0\include\node\v8.h(3843): note: see declaration of 'v8::Function::NewInstance'
1>Done building target "ClCompile" in project "BluetoothSerialPort.vcxproj".
1>Target Link:
1> node.lib(node.exe) : fatal error LNK1190: invalid fixup found, type 0x0003
1>Done building target "Link" in project "BluetoothSerialPort.vcxproj" -- FAILED.
1>
1>Done building project "BluetoothSerialPort.vcxproj" -- FAILED.
1>
1>Build FAILED.
1>
1>..\src\windows\DeviceINQ.cc(182): warning C4473: 'sscanf_s' : not enough arguments passed for format string
1>..\src\windows\DeviceINQ.cc(412): warning C4473: 'sscanf_s' : not enough arguments passed for format string
1>..\src\windows\DeviceINQ.cc(413): warning C4473: 'sscanf_s' : not enough arguments passed for format string
1>..\src\windows\BTSerialPortBinding.cc(190): warning C4996: 'v8::Function::NewInstance': was declared deprecated
1>node.lib(node.exe) : fatal error LNK1190: invalid fixup found, type 0x0003
1> 4 Warning(s)
1> 1 Error(s)
1>
1>Time Elapsed 00:00:04.20
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

@eelcocramer
Copy link
Owner

The thing is that the windows support is community contributed and I cannot test it myself. If I look at the automatic build script we use appveyor.yml I notice that it uses Visual Studio 2015. Maybe VS2017 introduces a problem?

@eelcocramer
Copy link
Owner

Maybe the logs from the automated builds are helpful: https://ci.appveyor.com/project/eelcocramer/node-bluetooth-serial-port

@zavitax
Copy link
Author

zavitax commented Jan 25, 2018

Tried npm install bluetooth-serial-port with VS2015 developer command prompt.

Got this:

C:\Shared\TalkBack\Dev\BluetoothVS2015>node index.js
C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bindings\bindings.js:83
throw e
^

Error: %1 is not a valid Win32 application.
\?\C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bluetooth-serial-port\build\Release\BluetoothSerialPort.node
at Error (native)
at Object.Module._extensions..node (module.js:597:18)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at bindings (C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bindings\bindings.js:76:44)
at C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bluetooth-serial-port\lib\bluetooth-serial-port.js:20:39
at Object. (C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bluetooth-serial-port\lib\bluetooth-serial-port.js:137:2)

Here's the log:

C:\Shared\TalkBack\Dev\BluetoothVS2015>npm install bluetooth-serial-port

[email protected] install C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bluetooth-serial-port
node-gyp configure build

C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bluetooth-serial-port>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" configure build ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" configure build )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
BluetoothSerialPort.cc
DeviceINQ.cc
BTSerialPortBinding.cc
BluetoothHelpers.cc
win_delay_load_hook.cc
..\src\windows\DeviceINQ.cc(44): warning C4996: '_WSAQuerySetA::dwSize': Use WS
AQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable depreca
ted API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bluetooth
-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1329): note: se
e declaration of '_WSAQuerySetA::dwSize'
..\src\windows\DeviceINQ.cc(45): warning C4996: '_WSAQuerySetA::dwNameSpace': U
se WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable de
precated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\blue
tooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1334): note: se
e declaration of '_WSAQuerySetA::dwNameSpace'
..\src\windows\DeviceINQ.cc(46): warning C4996: '_WSAQuerySetA::lpServiceClassI
d': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disab
le deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules
\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1331): note: se
e declaration of '_WSAQuerySetA::lpServiceClassId'
..\src\windows\DeviceINQ.cc(47): warning C4996: '_WSAQuerySetA::dwNumberOfCsAdd
rs': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disa
ble deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_module
s\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1340): note: se
e declaration of '_WSAQuerySetA::dwNumberOfCsAddrs'
..\src\windows\DeviceINQ.cc(48): warning C4996: '_WSAQuerySetA::lpszContext': U
se WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable de
precated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\blue
tooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1336): note: se
e declaration of '_WSAQuerySetA::lpszContext'
..\src\windows\DeviceINQ.cc(61): warning C4996: '_WSAQuerySetA::lpcsaBuffer': U
se WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable de
precated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\blue
tooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1341): note: se
e declaration of '_WSAQuerySetA::lpcsaBuffer'
..\src\windows\DeviceINQ.cc(52): warning C4996: 'WSALookupServiceBeginA': Use W
SALookupServiceBeginW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to di
sable deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modu
les\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(3693): note: se
e declaration of 'WSALookupServiceBeginA'
..\src\windows\DeviceINQ.cc(58): warning C4996: 'WSALookupServiceNextA': Use WS
ALookupServiceNextW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disa
ble deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_module
s\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(3752): note: se
e declaration of 'WSALookupServiceNextA'
..\src\windows\DeviceINQ.cc(146): warning C4996: '_WSAQuerySetA::dwSize': Use W
SAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprec
ated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bluetoot
h-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1329): note: se
e declaration of '_WSAQuerySetA::dwSize'
..\src\windows\DeviceINQ.cc(147): warning C4996: '_WSAQuerySetA::dwNameSpace':
Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable d
eprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\blu
etooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1334): note: se
e declaration of '_WSAQuerySetA::dwNameSpace'
..\src\windows\DeviceINQ.cc(168): warning C4996: '_WSAQuerySetA::lpcsaBuffer':
Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable d
eprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\blu
etooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1341): note: se
e declaration of '_WSAQuerySetA::lpcsaBuffer'
..\src\windows\DeviceINQ.cc(172): warning C4996: '_WSAQuerySetA::lpcsaBuffer':
Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable d
eprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\blu
etooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1341): note: se
e declaration of '_WSAQuerySetA::lpcsaBuffer'
..\src\windows\BTSerialPortBinding.cc(39): warning C4996: 'WSAStringToAddressA'
: Use WSAStringToAddressW() instead or define WINSOCK_DEPRECATED_NO_WARNINGS t
o disable deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node

modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(3623): note: se
e declaration of 'WSAStringToAddressA'
..\src\windows\DeviceINQ.cc(185): warning C4996: '_WSAQuerySetA::lpszServiceIns
tanceName': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS
to disable deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node
_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1330): note: se
e declaration of '_WSAQuerySetA::lpszServiceInstanceName'
..\src\windows\DeviceINQ.cc(151): warning C4996: 'WSALookupServiceBeginA': Use
WSALookupServiceBeginW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to d
isable deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_mod
ules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(3693): note: se
e declaration of 'WSALookupServiceBeginA'
..\src\windows\DeviceINQ.cc(164): warning C4996: 'WSALookupServiceNextA': Use W
SALookupServiceNextW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to dis
able deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modul
es\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(3752): note: se
e declaration of 'WSALookupServiceNextA'
..\src\windows\DeviceINQ.cc(172): warning C4996: 'WSAAddressToStringA': Use WSA
AddressToStringW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable
deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\b
luetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(3556): note: se
e declaration of 'WSAAddressToStringA'
..\src\windows\DeviceINQ.cc(180): warning C4473: 'sscanf_s' : not enough argume
nts passed for format string [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modul
es\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
..\src\windows\DeviceINQ.cc(180): note: placeholders and their parameters exp
ect 2 variadic arguments, but 1 were provided
..\src\windows\DeviceINQ.cc(180): note: the missing variadic argument 2 is re
quired by format string '%18[^)]'
..\src\windows\DeviceINQ.cc(180): note: this argument is used as a buffer siz
e
..\src\windows\BTSerialPortBinding.cc(188): warning C4996: 'v8::Function::NewIn
stance': was declared deprecated [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_m
odules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Users\ilya7.node-gyp\9.4.0\include\node\v8.h(3844): note: see declaration
of 'v8::Function::NewInstance'
..\src\windows\DeviceINQ.cc(378): warning C4996: '_WSAQuerySetA::dwSize': Use W
SAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprec
ated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bluetoot
h-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1329): note: se
e declaration of '_WSAQuerySetA::dwSize'
..\src\windows\DeviceINQ.cc(379): warning C4996: '_WSAQuerySetA::dwNameSpace':
Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable d
eprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\blu
etooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1334): note: se
e declaration of '_WSAQuerySetA::dwNameSpace'
..\src\windows\DeviceINQ.cc(394): warning C4996: '_WSAQuerySetA::dwOutputFlags'
: Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable
deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\b
luetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1342): note: se
e declaration of '_WSAQuerySetA::dwOutputFlags'
..\src\windows\DeviceINQ.cc(397): warning C4996: '_WSAQuerySetA::lpcsaBuffer':
Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable d
eprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\blu
etooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1341): note: se
e declaration of '_WSAQuerySetA::lpcsaBuffer'
..\src\windows\DeviceINQ.cc(401): warning C4996: '_WSAQuerySetA::lpcsaBuffer':
Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable d
eprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\blu
etooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1341): note: se
e declaration of '_WSAQuerySetA::lpcsaBuffer'
..\src\windows\DeviceINQ.cc(416): warning C4996: '_WSAQuerySetA::lpszServiceIns
tanceName': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS
to disable deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node
_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1330): note: se
e declaration of '_WSAQuerySetA::lpszServiceInstanceName'
..\src\windows\DeviceINQ.cc(428): warning C4996: '_WSAQuerySetA::dwSize': Use W
SAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprec
ated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bluetoot
h-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1329): note: se
e declaration of '_WSAQuerySetA::dwSize'
..\src\windows\DeviceINQ.cc(429): warning C4996: '_WSAQuerySetA::lpszContext':
Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable d
eprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\blu
etooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1336): note: se
e declaration of '_WSAQuerySetA::lpszContext'
..\src\windows\DeviceINQ.cc(431): warning C4996: '_WSAQuerySetA::lpServiceClass
Id': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disa
ble deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_module
s\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1331): note: se
e declaration of '_WSAQuerySetA::lpServiceClassId'
..\src\windows\DeviceINQ.cc(432): warning C4996: '_WSAQuerySetA::dwNameSpace':
Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable d
eprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\blu
etooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1334): note: se
e declaration of '_WSAQuerySetA::dwNameSpace'
..\src\windows\DeviceINQ.cc(444): warning C4996: '_WSAQuerySetA::lpcsaBuffer':
Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable d
eprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\blu
etooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1341): note: se
e declaration of '_WSAQuerySetA::lpcsaBuffer'
..\src\windows\DeviceINQ.cc(447): warning C4996: '_WSAQuerySetA::lpszServiceIns
tanceName': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS
to disable deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node
_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1330): note: se
e declaration of '_WSAQuerySetA::lpszServiceInstanceName'
..\src\windows\DeviceINQ.cc(385): warning C4996: 'WSALookupServiceBeginA': Use
WSALookupServiceBeginW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to d
isable deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_mod
ules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(3693): note: se
e declaration of 'WSALookupServiceBeginA'
..\src\windows\DeviceINQ.cc(391): warning C4996: 'WSALookupServiceNextA': Use W
SALookupServiceNextW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to dis
able deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modul
es\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(3752): note: se
e declaration of 'WSALookupServiceNextA'
..\src\windows\DeviceINQ.cc(401): warning C4996: 'WSAAddressToStringA': Use WSA
AddressToStringW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable
deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\b
luetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(3556): note: se
e declaration of 'WSAAddressToStringA'
..\src\windows\DeviceINQ.cc(410): warning C4473: 'sscanf_s' : not enough argume
nts passed for format string [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modul
es\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
..\src\windows\DeviceINQ.cc(410): note: placeholders and their parameters exp
ect 2 variadic arguments, but 1 were provided
..\src\windows\DeviceINQ.cc(410): note: the missing variadic argument 2 is re
quired by format string '%18[^)]'
..\src\windows\DeviceINQ.cc(410): note: this argument is used as a buffer siz
e
..\src\windows\DeviceINQ.cc(411): warning C4473: 'sscanf_s' : not enough argume
nts passed for format string [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modul
es\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
..\src\windows\DeviceINQ.cc(411): note: placeholders and their parameters exp
ect 2 variadic arguments, but 1 were provided
..\src\windows\DeviceINQ.cc(411): note: the missing variadic argument 2 is re
quired by format string '%18[^)]'
..\src\windows\DeviceINQ.cc(411): note: this argument is used as a buffer siz
e
..\src\windows\DeviceINQ.cc(438): warning C4996: 'WSALookupServiceBeginA': Use
WSALookupServiceBeginW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to d
isable deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_mod
ules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(3693): note: se
e declaration of 'WSALookupServiceBeginA'
..\src\windows\DeviceINQ.cc(442): warning C4996: 'WSALookupServiceNextA': Use W
SALookupServiceNextW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to dis
able deprecated API warnings [C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modul
es\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(3752): note: se
e declaration of 'WSALookupServiceNextA'
Creating library C:\Shared\TalkBack\Dev\BluetoothVS2015\node_modules\bluet
ooth-serial-port\build\Release\BluetoothSerialPort.lib and object C:\Shared\T
alkBack\Dev\BluetoothVS2015\node_modules\bluetooth-serial-port\build\Release
BluetoothSerialPort.exp
Generating code
All 252 functions were compiled because no usable IPDB/IOBJ from previous com
pilation was found.
Finished generating code
BluetoothSerialPort.vcxproj -> C:\Shared\TalkBack\Dev\BluetoothVS2015\node_mo
dules\bluetooth-serial-port\build\Release\BluetoothSerialPort.node
BluetoothSerialPort.vcxproj -> C:\Shared\TalkBack\Dev\BluetoothVS2015\node_mo
dules\bluetooth-serial-port\build\Release\BluetoothSerialPort.pdb (Full PDB)
win_delay_load_hook.cc
Generating code
All 1 functions were compiled because no usable IPDB/IOBJ from previous compi
lation was found.
Finished generating code
BluetoothSerialPortServer.vcxproj -> C:\Shared\TalkBack\Dev\BluetoothVS2015\n
ode_modules\bluetooth-serial-port\build\Release\BluetoothSerialPortServer.no
de
BluetoothSerialPortServer.vcxproj -> C:\Shared\TalkBack\Dev\BluetoothVS2015\n
ode_modules\bluetooth-serial-port\build\Release\BluetoothSerialPortServer.pdb
(Full PDB)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

@zavitax
Copy link
Author

zavitax commented Jan 25, 2018

Tried building with VS2015, configuring Win32 platform.

Got this:

https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k(LNK1112)&rd=true

LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
Project: BluetoothSerialPort
File: node.lib (node.exe)
Line: 1

Perhaps this supports only 32-bit versions of node.exe ?

@eelcocramer
Copy link
Owner

Maybe. The automatic build seems to work with both 32 as 64 bits versions but it looks like the module compiles to 32 bits.

@eelcocramer
Copy link
Owner

I've changed the automated build configuration to include more recent versions of node and to use VS2017. On the build server everything seems to build fine: https://ci.appveyor.com/project/eelcocramer/node-bluetooth-serial-port/build/1.0.177

I've created an issue (#174) to included pre-build binaries in published versions of this module. That may be more friendly to users. Do not expect this to be available soon though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants