lsongdev / lsongdev/node-bluetooth
[BUG]: Can't build on windows 11 : missing function arguments
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 205
- 派生
- 56
- PR 合并指标
- 30 天内没有已合并 PR
描述
Description of the bug
Installed with Yarn on electron-vite project on windows 11
Yarn install says node-bluetooth@npm:1.2.6 must be built because it never has been before or the last one failed
then build fails with error :
...\node_modules\node-bluetooth\src\windows\DeviceINQ.cc(128,60): error C2660: 'v8::FunctionTemplate::GetFunction' : function doesn't take 0 arguments
Steps To Reproduce
In fresh electron-vite project :
- choco install python visualstudio2022-workload-vctools -y
- yarn add -d electron-rebuild
- yarn add node-bluetooth bindings
Additional Information
Yarn add result :
node-bluetooth@npm:1.2.6 must be built because it never has been before or the last one failed
node-bluetooth@npm:1.2.6 couldn't be built successfully (exit code 1, logs can be found here: ...\AppData\Local\Temp\xfs-158d74f1\build.log)
build.log :
each of the following errors happen multiple times, with a lot of warnings I didn't paste here
...\node_modules\node-bluetooth\src\windows\DeviceINQ.cc(128,60): error C2660: 'v8::FunctionTemplate::GetFunction' : function doesn't take 0 arguments
...\node_modules\node-bluetooth\src\windows\DeviceINQ.cc(336,30): error C2665: 'v8::String::Utf8Value::Utf8Value' : no overloaded function could convert all the argument types
...\node_modules\node-bluetooth\src\windows\DeviceINQ.cc(416,32): error C2661: 'v8::Object::Set' : no overloaded function takes 2 arguments
...\node_modules\node-bluetooth\src\windows\DeviceINQ.cc(522,9): error C2660: 'v8::Function::Call' : function doesn't take 3 arguments
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用列出的 Yarn 和 Windows 设置,在一个全新的 electron-vite 项目中重现该失败,然后结合 build.log 中的错误检查 src/windows/DeviceINQ.cc。当 node-bluetooth 在 Windows 11 上成功构建且不再出现报告的 V8 API 错误时,工作即告完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp, electron, node.js
- 领域
- build-system, embedded-iot
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100