node-bluetooth-serial-port icon indicating copy to clipboard operation
node-bluetooth-serial-port copied to clipboard

"Error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments" while installing

Open Sv443 opened this issue 5 years ago • 19 comments

I'm trying to install this package with npm i bluetooth-serial-port and after switching from Python 3 to 2.7 (since it threw another error) it has been throwing me this new error a few times while installing:
Error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments
This error is happening while node-gyp is building the BluetoothSerialPort project.
There's also a bunch of warnings.
Here's the full error log.

OS: Windows 10 (1909 - Build 18363.657)
Node.js version: 13.9.0
NPM version: 6.13.7
Python version: 2.7.16
I also have Visual Studio 2019 and its SDKs.

Sv443 avatar Feb 28 '20 21:02 Sv443

Node v13 is currently not supported please use v12 with this module.

eelcocramer avatar Feb 29 '20 06:02 eelcocramer

Node v13 is currently not supported please use v12 with this module.

Okay well I'm glad there's at least a temporary workaround to it. Although with the new V8 version 8 update coming to Node soon I'd want to be able to switch to v13 entirely, not having some projects require NVM. Would it be possible to update the package to support Node 13 in the near future?

Sv443 avatar Mar 05 '20 08:03 Sv443

It is possible to update the package and add node 13 support but I do not have plans to add this myself.

I'm happy to accept a PR that adds support though.

eelcocramer avatar Mar 05 '20 09:03 eelcocramer

I faced the same issue today while using Node v13 in Azure Pipelines, npm install failed with same error.I had to used Node version 12.16.1 to resolve this

jithinjosejacob avatar Nov 12 '20 23:11 jithinjosejacob

I got this error when I execute yarn on Windows

What the hell is this?? I tried windows build tools 2019, 2017, 2015 node 14.15.1(LTS), 12.19.1(LTS) 12.16.1(LTS)

nothing worked. When changed to v10.23.0(LTS) started working

1pavanb avatar Nov 16 '20 20:11 1pavanb

v12.18.3(LTS)

+1

dhc-zhuchuanpeng avatar Dec 07 '20 09:12 dhc-zhuchuanpeng

So does this only work on v12 or 10?

polartar avatar Sep 03 '21 15:09 polartar

See #309

eelcocramer avatar Sep 03 '21 16:09 eelcocramer

Thanks, @eelcocramer,

Then How can I fix this issue? I am using Node 16.5.0, and Vue.js image

polartar avatar Sep 03 '21 18:09 polartar

You may try the fix in the branch mentioned in #309. It would be great if you can provide feedback wether that works or not. CI suggest that the fix in that branch builds on windows.

eelcocramer avatar Sep 03 '21 19:09 eelcocramer

Sorry, I can't see any solutions there

polartar avatar Sep 03 '21 21:09 polartar

Did you mean these?

  • Needs Visual Studio (Visual C++) and its command line tools installed.
  • Needs Python 2.x installed and accessible from the command line path. I installed Python 3.8, should I remove it?

polartar avatar Sep 03 '21 21:09 polartar

I tried to install Visual C++ and it's command line tools, but same issue

polartar avatar Sep 03 '21 22:09 polartar

I meant you could try out the fix in the branch.

Working on a fix, please check the next-release branch and let me know if it works (or does not work) for you!

eelcocramer avatar Sep 04 '21 05:09 eelcocramer

Why does this need for my work?

polartar avatar Sep 05 '21 01:09 polartar

I'm not sure I understand your question.

The current version of the module does not compile against newer versions of nodejs. The patch in the branch does compile. I'm just not sure wether it is functionally ok so I'm reaching out to the community to validate that branch.

eelcocramer avatar Sep 05 '21 12:09 eelcocramer

In that branch, you are going to install bluetooth-serial-port library, but I am not using it. The gyp error is a common issue in Node 14 and 16. If I use Node 12, it is working. So my question is about how we can fix gyp error on Node 14 and 16

polartar avatar Sep 05 '21 14:09 polartar

If you think its an issue with gyp you should check with them. I'm sure they will be very supportive...

eelcocramer avatar Sep 05 '21 15:09 eelcocramer

I faced the same issue today while using Node v13 in Azure Pipelines, npm install failed with same error.I had to used Node version 12.16.1 to resolve this

Thanks, it worked for me!

charles-dr avatar Dec 04 '21 19:12 charles-dr