Closed vchenpeng closed 6 years ago
CC @Christywl please check this.
i got the same problem,asked for help
@rogerwang , I can reproduce this issue on Windows 10.
c:\nwjs\test\node_modules\nan\nan_maybe_43_inl.h(112): warning C4996: 'v8::Object::ForceSet': was declared deprecated (
compiling source file ..\src\threaded_callback_invokation.cc) [C:\nwjs\test\node_modules\ffi\build\ffi_bindings.vcxproj
]
c:\nwjs\test\node_modules\nan\nan_maybe_43_inl.h(112): warning C4996: 'v8::Object::ForceSet': was declared deprecated (
compiling source file ..\src\ffi.cc) [C:\nwjs\test\node_modules\ffi\build\ffi_bindings.vcxproj]
C:\Users\WebQA\.nw-gyp\0.25.3\deps\v8\include\v8.h(3102): note: see declaration of 'v8::Object::ForceSet' (compiling
source file ..\src\threaded_callback_invokation.cc)C:\Users\WebQA\.nw-gyp\0.25.3\deps\v8\include\v8.h(3102): note: se
e declaration of 'v8::Object::ForceSet' (compiling source file ..\src\ffi.cc)
c:\nwjs\test\node_modules\nan\nan_maybe_43_inl.h(112): warning C4996: 'v8::Object::ForceSet': was declared deprecated (
compiling source file ..\src\callback_info.cc) [C:\nwjs\test\node_modules\ffi\build\ffi_bindings.vcxproj]
C:\Users\WebQA\.nw-gyp\0.25.3\deps\v8\include\v8.h(3102): note: see declaration of 'v8::Object::ForceSet' (compiling
source file ..\src\callback_info.cc)
..\src\ffi.cc(111): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::
Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Valu
e>' [C:\nwjs\test\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(111): note: No user-defined-conversion operator available that can perform this conversion, or the oper
ator cannot be called
..\src\ffi.cc(114): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::
Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Valu
e>' [C:\nwjs\test\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(114): note: No user-defined-conversion operator available that can perform this conversion, or the oper
ator cannot be called
..\src\ffi.cc(123): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::
Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Valu
e>' [C:\nwjs\test\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(123): note: No user-defined-conversion operator available that can perform this conversion, or the oper
ator cannot be called
..\src\ffi.cc(124): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::
Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Valu
e>' [C:\nwjs\test\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(124): note: No user-defined-conversion operator available that can perform this conversion, or the oper
ator cannot be called
..\src\ffi.cc(125): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::
Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Valu
e>' [C:\nwjs\test\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(125): note: No user-defined-conversion operator available that can perform this conversion, or the oper
ator cannot be called
..\src\ffi.cc(126): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::
Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Valu
e>' [C:\nwjs\test\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(126): note: No user-defined-conversion operator available that can perform this conversion, or the oper
ator cannot be called
..\src\ffi.cc(132): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::
Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Valu
e>' [C:\nwjs\test\node_modules\ffi\build\ffi_bindings.vcxproj]
..\src\ffi.cc(132): note: No user-defined-conversion operator available that can perform this conversion, or the oper
ator cannot be called
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\WebQA\AppData\Roaming\npm\node_modules\nw-gyp\lib\build.js:294:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\WebQA\\AppData\\Roaming\\npm\\node_modules\\nw-gyp\\bin\\nw-gyp.js" "rebuild" "--target=0.25.3" "-arch=ia32" "--msvs_version=2015" "--release"
gyp ERR! cwd C:\nwjs\test\node_modules\ffi
gyp ERR! node -v v7.8.0
gyp ERR! nw-gyp -v v3.4.0
gyp ERR! not ok
@vchenpeng has the issue been fixed?help!
no,but I think it's nw-gyp's problem. @fangshuoshirounet
This is still an issue. I'm on Windows 10 x64, removed all previous versions of MSVS, then did npm install -g windows-build-tools
vis admin powershell.
> nw-gyp --version
v3.6.3
> cd node_modules\ffi\
> nw-gyp rebuild --target=0.27.3
gyp info it worked if it ends with ok
gyp info using nw-gyp@3.6.3
gyp info using node@8.9.0 | win32 | x64
gyp info spawn C:\msys2\mingw64\bin\python2.EXE
gyp info spawn args [ 'C:\\dev\\npm\\node_modules\\nw-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\\htdocs\\turtl\\desktop\\node_modules\\ffi\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\dev\\npm\\node_modules\\nw-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\andrew\\.nw-gyp\\0.27.3\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\andrew\\.nw-gyp\\0.27.3',
gyp info spawn args '-Dnode_gyp_dir=C:\\dev\\npm\\node_modules\\nw-gyp',
gyp info spawn args '-Dnode_lib_file="C:\\Users\\andrew\\.nw-gyp\\0.27.3\\<(target_arch)\\node.lib"',
gyp info spawn args '-Dnw_lib_file="C:\\Users\\andrew\\.nw-gyp\\0.27.3\\<(target_arch)\\nw.lib"',
gyp info spawn args '-Dmodule_root_dir=C:\\htdocs\\turtl\\desktop\\node_modules\\ffi',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '-Dv13=1',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\htdocs\\turtl\\desktop\\node_modules\\ffi\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Building assembly file ../../../deps/libffi/src/x86/win64.asm
Assembling: ../../../deps/libffi/src/x86/win64.asm
prep_cif.c
types.c
raw_api.c
java_raw_api.c
closures.c
ffi.c
win_delay_load_hook.cc
ffi.vcxproj -> C:\htdocs\turtl\desktop\node_modules\ffi\build\Release\/libffi.lib
ffi.cc
callback_info.cc
threaded_callback_invokation.cc
win32-dlfcn.cc
win_delay_load_hook.cc
../src/ffi.cc(111): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Value>' [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
../src/ffi.cc(111): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
../src/ffi.cc(114): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Value>' [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
../src/ffi.cc(114): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
../src/ffi.cc(123): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Value>' [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
../src/ffi.cc(123): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
../src/ffi.cc(124): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Value>' [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
../src/ffi.cc(124): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
../src/ffi.cc(125): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Value>' [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
../src/ffi.cc(125): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
../src/ffi.cc(126): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Value>' [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
../src/ffi.cc(126): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
../src/ffi.cc(132): error C2664: 'v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>,v8::Local<v8::Value>,v8::Local<v8::Value>,v8::PropertyAttribute)': cannot convert argument 3 from 'v8::PropertyAttribute' to 'v8::Local<v8::Value>' [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
../src/ffi.cc(132): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
../src/ffi.cc(58): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\htdocs\turtl\desktop\node_modules\nan\nan_maybe_43_inl.h(116): note: see declaration of 'Nan::ForceSet'
../src/ffi.cc(59): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\htdocs\turtl\desktop\node_modules\nan\nan_maybe_43_inl.h(116): note: see declaration of 'Nan::ForceSet'
../src/ffi.cc(60): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\htdocs\turtl\desktop\node_modules\nan\nan_maybe_43_inl.h(116): note: see declaration of 'Nan::ForceSet'
../src/ffi.cc(63): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\htdocs\turtl\desktop\node_modules\nan\nan_maybe_43_inl.h(116): note: see declaration of 'Nan::ForceSet'
../src/ffi.cc(64): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\htdocs\turtl\desktop\node_modules\nan\nan_maybe_43_inl.h(116): note: see declaration of 'Nan::ForceSet'
../src/ffi.cc(65): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\htdocs\turtl\desktop\node_modules\nan\nan_maybe_43_inl.h(116): note: see declaration of 'Nan::ForceSet'
../src/ffi.cc(78): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\htdocs\turtl\desktop\node_modules\nan\nan_maybe_43_inl.h(116): note: see declaration of 'Nan::ForceSet'
../src/ffi.cc(88): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\htdocs\turtl\desktop\node_modules\nan\nan_maybe_43_inl.h(116): note: see declaration of 'Nan::ForceSet'
../src/ffi.cc(91): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\htdocs\turtl\desktop\node_modules\nan\nan_maybe_43_inl.h(116): note: see declaration of 'Nan::ForceSet'
../src/ffi.cc(94): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\htdocs\turtl\desktop\node_modules\nan\nan_maybe_43_inl.h(116): note: see declaration of 'Nan::ForceSet'
../src/ffi.cc(97): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\htdocs\turtl\desktop\node_modules\ffi\build\ffi_bindings.vcxproj]
c:\htdocs\turtl\desktop\node_modules\nan\nan_maybe_43_inl.h(116): note: see declaration of 'Nan::ForceSet'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\dev\npm\node_modules\nw-gyp\lib\build.js:261:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\dev\\nodejs\\node.exe" "C:\\dev\\npm\\node_modules\\nw-gyp\\bin\\nw-gyp.js" "rebuild" "--target=0.27.3"
gyp ERR! cwd C:\htdocs\turtl\desktop\node_modules\ffi
gyp ERR! node -v v8.9.0
gyp ERR! nw-gyp -v v3.6.3
gyp ERR! not ok
Because ffi doesn't support Node 9.x yet, which is included in NW 0.27: https://github.com/node-ffi/node-ffi/pull/439
You could try a previous NW version which contains the similar v8 version with the Node.js version which ffi supports.
When i am using this command,there was an exception:
The error message is shown below:
Using the node-gyp command does not occur with this error:
Operating environment: node: v8.4.0(bit 32) nw-gyp: v3.4.0 os: windows 7(bit 64)