eelcocramer / node-bluetooth-serial-port

Serial I/O over bluetooth for NodeJS
Other
495 stars 139 forks source link

Problem with installation #378

Open thefakhreddin opened 2 years ago

thefakhreddin commented 2 years ago

Hello. I've been trying to install this package for days via npm i under the title of bluetooth-serial-port which was not successful. After going through days of struggle and almost checking every possible thing, I accidentally noticed that that the name of the repo is in fact node-bluetooth-serial-port but the readme file instructed to use npm i bluetooth-serial-port (the word "node" is missing). And I guess that was it. A simple name confusion. If I'm correct, could you please clarify this in the readme to prevent further confusion? Thanks.

eelcocramer commented 2 years ago

Thank you for your comment.

The name this module is registered with on npm is bluetooth-serial-port. Hence the instruction.

https://www.npmjs.com/package/bluetooth-serial-port

eelcocramer commented 2 years ago

As a matter of fact you are installing a fork of this module.

https://www.npmjs.com/package/node-bluetooth-serial-port

The repo for that cab be found here:

https://github.com/tinyprinter/node-bluetooth-serial-port

thefakhreddin commented 2 years ago

@eelcocramer

Thanks for your quick response. So I ran npm i bluetooth-serial-port --save again. I keep getting this long error. Do you have any idea what the problem might be? I've been struggling with it for days now.

node -v => 16.13.1 npm -v => 8.3.0 My node-gyp is at 8.4.1 and it's set to use python 3.9 and msvs 2017. I've also tried msvs 2019 node-gyp instructions. OS: Windows 11

I'm wondering what's the right versioning combination of the above?

Here's my error:

PS G:\Fakhreddin A\Desktop\myProject> npm i bluetooth-serial-port --save
npm ERR! code 1
npm ERR! path G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp configure build
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
npm ERR!   BluetoothSerialPort.cc
npm ERR!   DeviceINQ.cc
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(44): warning C4996: '_WSAQuerySetA::dwSize': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1320): note: see declaration of '_WSAQuerySetA::dwSize'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(45): warning C4996: '_WSAQuerySetA::dwNameSpace': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1325): note: see declaration of '_WSAQuerySetA::dwNameSpace'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(46): warning C4996: '_WSAQuerySetA::lpServiceClassId': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1322): note: see declaration of '_WSAQuerySetA::lpServiceClassId'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(47): warning C4996: '_WSAQuerySetA::dwNumberOfCsAddrs': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1331): note: see declaration of '_WSAQuerySetA::dwNumberOfCsAddrs'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(48): warning C4996: '_WSAQuerySetA::lpszContext': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1327): note: see declaration of '_WSAQuerySetA::lpszContext'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(61): warning C4996: '_WSAQuerySetA::lpcsaBuffer': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1332): note: see declaration of '_WSAQuerySetA::lpcsaBuffer'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(52): warning C4996: 'WSALookupServiceBeginA': Use WSALookupServiceBeginW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(3628): note: see declaration of 'WSALookupServiceBeginA'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(58): warning C4996: 'WSALookupServiceNextA': Use WSALookupServiceNextW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(3679): note: see declaration of 'WSALookupServiceNextA'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(104): warning C4996: 'Nan::Callback::Call': was declared deprecated [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\nan\nan.h(1744): note: see declaration of 'Nan::Callback::Call'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(146): warning C4996: '_WSAQuerySetA::dwSize': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1320): note: see declaration of '_WSAQuerySetA::dwSize'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(147): warning C4996: '_WSAQuerySetA::dwNameSpace': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1325): note: see declaration of '_WSAQuerySetA::dwNameSpace'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(168): warning C4996: '_WSAQuerySetA::lpcsaBuffer': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1332): note: see declaration of '_WSAQuerySetA::lpcsaBuffer'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(172): warning C4996: '_WSAQuerySetA::lpcsaBuffer': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1332): note: see declaration of '_WSAQuerySetA::lpcsaBuffer'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(180): warning C4473: 'sscanf_s' : not enough arguments passed for format string [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(180): note: placeholders and their parameters expect 2 variadic arguments, but 1 were provided
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(180): note: the missing variadic argument 2 is required by format string '%18[^)]'
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(180): note: this argument is used as a buffer size
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(185): warning C4996: '_WSAQuerySetA::lpszServiceInstanceName': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1321): note: see declaration of '_WSAQuerySetA::lpszServiceInstanceName'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(151): warning C4996: 'WSALookupServiceBeginA': Use WSALookupServiceBeginW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(3628): note: see declaration of 'WSALookupServiceBeginA'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(164): warning C4996: 'WSALookupServiceNextA': Use WSALookupServiceNextW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(3679): note: see declaration of 'WSALookupServiceNextA'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(172): warning C4996: 'WSAAddressToStringA': Use WSAAddressToStringW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(3507): note: see declaration of 'WSAAddressToStringA'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(267): warning C4996: 'Nan::Callback::Call': was declared deprecated [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\nan\nan.h(1744): note: see declaration of 'Nan::Callback::Call'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(270): warning C4996: 'Nan::Callback::Call': was declared deprecated [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\nan\nan.h(1744): note: see declaration of 'Nan::Callback::Call'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(299): warning C4996: 'Nan::Callback::Call': was declared deprecated [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\nan\nan.h(1744): note: see declaration of 'Nan::Callback::Call'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(302): warning C4996: 'Nan::Callback::Call': was declared deprecated [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\nan\nan.h(1744): note: see declaration of 'Nan::Callback::Call'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(380): warning C4996: '_WSAQuerySetA::dwSize': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1320): note: see declaration of '_WSAQuerySetA::dwSize'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(381): warning C4996: '_WSAQuerySetA::dwNameSpace': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1325): note: see declaration of '_WSAQuerySetA::dwNameSpace'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(396): warning C4996: '_WSAQuerySetA::dwOutputFlags': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1333): note: see declaration of '_WSAQuerySetA::dwOutputFlags'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(399): warning C4996: '_WSAQuerySetA::lpcsaBuffer': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1332): note: see declaration of '_WSAQuerySetA::lpcsaBuffer'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(403): warning C4996: '_WSAQuerySetA::lpcsaBuffer': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1332): note: see declaration of '_WSAQuerySetA::lpcsaBuffer'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(412): warning C4473: 'sscanf_s' : not enough arguments passed for format string [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(412): note: placeholders and their parameters expect 2 variadic arguments, but 1 were provided
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(412): note: the missing variadic argument 2 is required by format string '%18[^)]'
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(412): note: this argument is used as a buffer size
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(413): warning C4473: 'sscanf_s' : not enough arguments passed for format string [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(413): note: placeholders and their parameters expect 2 variadic arguments, but 1 were provided
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(413): note: the missing variadic argument 2 is required by format string '%18[^)]'
npm ERR!   g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(413): note: this argument is used as a buffer size
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(418): warning C4996: '_WSAQuerySetA::lpszServiceInstanceName': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1321): note: see declaration of '_WSAQuerySetA::lpszServiceInstanceName'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(418): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(419): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(430): warning C4996: '_WSAQuerySetA::dwSize': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1320): note: see declaration of '_WSAQuerySetA::dwSize'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(431): warning C4996: '_WSAQuerySetA::lpszContext': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1327): note: see declaration of '_WSAQuerySetA::lpszContext'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(433): warning C4996: '_WSAQuerySetA::lpServiceClassId': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1322): note: see declaration of '_WSAQuerySetA::lpServiceClassId'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(434): warning C4996: '_WSAQuerySetA::dwNameSpace': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1325): note: see declaration of '_WSAQuerySetA::dwNameSpace'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(446): warning C4996: '_WSAQuerySetA::lpcsaBuffer': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1332): note: see declaration of '_WSAQuerySetA::lpcsaBuffer'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(448): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(449): warning C4996: '_WSAQuerySetA::lpszServiceInstanceName': Use WSAQUERYSETW instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1321): note: see declaration of '_WSAQuerySetA::lpszServiceInstanceName'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(449): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(450): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(479): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(480): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(387): warning C4996: 'WSALookupServiceBeginA': Use WSALookupServiceBeginW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(3628): note: see declaration of 'WSALookupServiceBeginA'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(393): warning C4996: 'WSALookupServiceNextA': Use WSALookupServiceNextW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(3679): note: see declaration of 'WSALookupServiceNextA'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(403): warning C4996: 'WSAAddressToStringA': Use WSAAddressToStringW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(3507): note: see declaration of 'WSAAddressToStringA'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(440): warning C4996: 'WSALookupServiceBeginA': Use WSALookupServiceBeginW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(3628): note: see declaration of 'WSALookupServiceBeginA'
npm ERR! g:\fakhreddin a\desktop\myproject\node_modules\bluetooth-serial-port\src\windows\deviceinq.cc(444): warning C4996: 'WSALookupServiceNextA': Use WSALookupServiceNextW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\BluetoothSerialPort.vcxproj]
npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(3679): note: see declaration of 'WSALookupServiceNextA'
npm ERR!   win_delay_load_hook.cc
npm ERR!   Generating code
npm ERR!   All 1 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
npm ERR!   Finished generating code
npm ERR!   BluetoothSerialPortServer.vcxproj -> G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port\build\Release\\BluetoothSerialPortServer.node
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@16.13.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.9 found at "C:\Users\Fakhreddin A\AppData\Local\Programs\Python\Python39\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.28307.1759) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\Fakhreddin A\AppData\Local\Programs\Python\Python39\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'C:\\Users\\Fakhreddin A\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'msvs',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'G:\\Fakhreddin A\\Desktop\\myProject\\node_modules\\bluetooth-serial-port\\build\\config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\Fakhreddin A\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\Fakhreddin A\\AppData\\Local\\node-gyp\\Cache\\16.13.1\\include\\node\\common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=C:\\Users\\Fakhreddin A\\AppData\\Local\\node-gyp\\Cache\\16.13.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\Fakhreddin A\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\Fakhreddin A\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.13.1\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=G:\\Fakhreddin A\\Desktop\\myProject\\node_modules\\bluetooth-serial-port',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'G:\\Fakhreddin A\\Desktop\\myProject\\node_modules\\bluetooth-serial-port\\build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'build/binding.sln',
npm ERR! gyp info spawn args   '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args   '/nologo',
npm ERR! gyp info spawn args   '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:\Users\Fakhreddin A\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "G:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Fakhreddin A\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "build"
npm ERR! gyp ERR! cwd G:\Fakhreddin A\Desktop\myProject\node_modules\bluetooth-serial-port
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Fakhreddin A\AppData\Local\npm-cache\_logs\2022-01-08T12_09_10_078Z-debug-0.log
PS G:\Fakhreddin A\Desktop\myProject>
eelcocramer commented 2 years ago

See #309

tl;dr; this module is deprecated and does not support node >= 1.13. Fix may be available in next-release branch.

thefakhreddin commented 2 years ago

@eelcocramer Thank you. I'm trying the branch. I'm getting this error now:

node_modules\bluetooth-serial-port\build\Release\BluetoothSerialPort.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 89. Please try re-compiling or re-installing

I tried this but it didn't work out.

I have never had this error before, to what app is the version referring (93/89)? I guess I need to downgrade a few things. Again, what is the latest version of node that supports your module? I probably need to downgrade my node.

eelcocramer commented 2 years ago

This happens when you install the module with one version of node en run it with another version. You should stick with one version for building and running.

The master branch (and npm stored code) should work with node 12.

thefakhreddin commented 2 years ago

@eelcocramer Thanks for your hint. But I have no idea how to fix it. I couldn't find anything useful online either. Could you please tell me how to sync these versions?

eelcocramer commented 2 years ago

Just remove and re-install.

thefakhreddin commented 2 years ago

@eelcocramer I've done that already. I deleted the whole node_modules folder and ran npm i. Still no luck!

eelcocramer commented 2 years ago

That should be enough when you ran npm i bluetooth-serial-port but when you build from source (so run npm install from the root of the checkout version of this repo) you should remove the build artefacts from the build folder or run npm rebuild.