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

Why can't I ffi? I can't describe the error. #637

Open
Star-Vk opened this issue Jun 2, 2023 · 3 comments
Open

Why can't I ffi? I can't describe the error. #637

Star-Vk opened this issue Jun 2, 2023 · 3 comments

Comments

@Star-Vk
Copy link

Star-Vk commented Jun 2, 2023

C:\Users\asus>node -v
v16.17.0

C:\Users\asus>npm -v
8.19.4

Firstly, I execute these orders.

cnpm install --global --production windows-build-tools
npm install -g node-gyp
npm config set python "C:\Users\asus\.windows-build-tools\python27\python.exe"
npm install ffi

Everything is OK. But, finally, executing "npm install ffi" is wrong. The deatails are here.

E:\Desktop\soTest>cnpm install ffi
- [0/1] Installing nan@2[npminstall:runscript] ffi@2.3.0 › ref@1 found binding.gyp file, auto run "node-gyp rebuild", root: "E:\\Desktop\\soTest\\node_modules\\_ref@1.3.5@ref"

E:\Desktop\soTest\node_modules\_ref@1.3.5@ref>node "C:\Users\asus\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\\node-gyp.js" rebuild
\ [0/1] Installing nan@2在此解决方案中一次生成一个项目。若要启用并行生成,请添加“-m”开关。

/ [0/1] Installing nan@2  binding.cc
| [0/1] Installing nan@2E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(222,28): error C2660: “v8::Value::BooleanValue”: 函数不接受 0 个参数 [E:\Desktop\soTest\node_modules\_
ref@1.3.5@ref\build\binding.vcxproj]
C:\Users\asus\AppData\Local\node-gyp\Cache\16.17.0\include\node\v8.h(3096,8): message : 参见“v8::Value::BooleanValue”的声明 [E:\Desktop\soTest\node_modules\_ref
@1.3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(222,28): message : 尝试匹配参数列表“()”时 [E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\build\binding.
vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(253,24): error C2660: “v8::Value::Uint32Value”: 函数不接受 0 个参数 [E:\Desktop\soTest\node_modules\_r
ef@1.3.5@ref\build\binding.vcxproj]
C:\Users\asus\AppData\Local\node-gyp\Cache\16.17.0\include\node\v8.h(3104,41): message : 参见“v8::Value::Uint32Value”的声明 [E:\Desktop\soTest\node_modules\_ref
@1.3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(253,24): message : 尝试匹配参数列表“()”时 [E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\build\binding.
vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(360,27): error C2665: “v8::String::Utf8Value::Utf8Value”: 没有重载函数可以转换所有参数类型 [E:\Desktop\soTest\
node_modules\_ref@1.3.5@ref\build\binding.vcxproj]
C:\Users\asus\AppData\Local\node-gyp\Cache\16.17.0\include\node\v8.h(3588,5): message : 可能是“v8::String::Utf8Value::Utf8Value(const v8::String::Utf8Value &)
” [E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(360,27): message : “v8::String::Utf8Value::Utf8Value(const v8::String::Utf8Value &)”: 无法将参 数 1
从“v8::Local<v8::Value>”转换为“const v8::String::Utf8Value &” [E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(360,28): message : 原因如下: 无法从“v8::Local<v8::Value>”转换为“const v8::String::Utf8Value” [E:\Desktop
\soTest\node_modules\_ref@1.3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(360,28): message : 没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符 [E:\Desktop\soTest\node_modules\_ref@1.3.5
@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(360,27): message : 尝试匹配参数列表“(v8::Local<v8::Value>)”时 [E:\Desktop\soTest\node_modules\_ref@1.3.
5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(447,27): error C2665: “v8::String::Utf8Value::Utf8Value”: 没有重载函数可以转换所有参数类型 [E:\Desktop\soTest\
node_modules\_ref@1.3.5@ref\build\binding.vcxproj]
C:\Users\asus\AppData\Local\node-gyp\Cache\16.17.0\include\node\v8.h(3588,5): message : 可能是“v8::String::Utf8Value::Utf8Value(const v8::String::Utf8Value &)
” [E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(447,27): message : “v8::String::Utf8Value::Utf8Value(const v8::String::Utf8Value &)”: 无法将参 数 1
从“v8::Local<v8::Value>”转换为“const v8::String::Utf8Value &” [E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(447,28): message : 原因如下: 无法从“v8::Local<v8::Value>”转换为“const v8::String::Utf8Value” [E:\Desktop
\soTest\node_modules\_ref@1.3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(447,28): message : 没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符 [E:\Desktop\soTest\node_modules\_ref@1.3.5
@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(447,27): message : 尝试匹配参数列表“(v8::Local<v8::Value>)”时 [E:\Desktop\soTest\node_modules\_ref@1.3.
5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(521,24): error C2660: “v8::Value::Uint32Value”: 函数不接受 0 个参数 [E:\Desktop\soTest\node_modules\_r
ef@1.3.5@ref\build\binding.vcxproj]
C:\Users\asus\AppData\Local\node-gyp\Cache\16.17.0\include\node\v8.h(3104,41): message : 参见“v8::Value::Uint32Value”的声明 [E:\Desktop\soTest\node_modules\_ref
@1.3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(521,24): message : 尝试匹配参数列表“()”时 [E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\build\binding.
vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(550,30): error C2660: “v8::Value::Uint32Value”: 函数不接受 0 个参数 [E:\Desktop\soTest\node_modules\_r
ef@1.3.5@ref\build\binding.vcxproj]
C:\Users\asus\AppData\Local\node-gyp\Cache\16.17.0\include\node\v8.h(3104,41): message : 参见“v8::Value::Uint32Value”的声明 [E:\Desktop\soTest\node_modules\_ref
@1.3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(550,30): message : 尝试匹配参数列表“()”时 [E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\build\binding.
vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(582,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(582,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(583,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(583,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(584,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(584,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(585,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(585,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(586,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(586,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(587,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(587,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(588,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(588,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(589,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(589,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(590,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(590,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(591,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(591,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(593,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(593,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(594,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(594,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(595,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(595,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(596,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(596,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(597,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(597,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(598,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(598,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(599,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(599,3): message : 尝试匹配参数列表“(v8::Local<v8::String>, v8::Local<T>)”时 [E:\Desktop\soTest\node_mod
ules\_ref@1.3.5@ref\build\binding.vcxproj]
          with
          [
              T=v8::Uint32
          ]
E:\Desktop\soTest\node_modules\_ref@1.3.5@ref\src\binding.cc(600,3): error C2661: “v8::Object::Set”: 没有重载函数接受 2 个参数 [E:\Desktop\soTest\node_modules\_ref@1.
3.5@ref\build\binding.vcxproj]
E:\Desktop\soTest\node_
.....

I don't know how I search for the resolution of this problem in that it is hardly to be described.

@Star-Vk Star-Vk changed the title Why can I can't ffi? I can't describe the error. Why I can't ffi? I can't describe the error. Jun 2, 2023
@Star-Vk Star-Vk changed the title Why I can't ffi? I can't describe the error. Why can't I ffi? I can't describe the error. Jun 2, 2023
@whqgo
Copy link

whqgo commented Jul 19, 2023

I am also experiencing the same issue, it seems to be because work on node <12 and node-ffi-napi works on node >=12.

@Woisol
Copy link

Woisol commented Feb 9, 2024

Same issue, most special in tons of
with
[
T=v8::Uint32
]
thought node -v v20.11.0 as well as node-gyp -v v10.0.1
Hope someone to help

1 similar comment
@Woisol
Copy link

Woisol commented Feb 9, 2024

Same issue, most special in tons of
with
[
T=v8::Uint32
]
thought node -v v20.11.0 as well as node-gyp -v v10.0.1
Hope someone to help

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

3 participants