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

use openvpn-bin in electron #8

Open
hzl123456 opened this issue Sep 15, 2019 · 0 comments
Open

use openvpn-bin in electron #8

hzl123456 opened this issue Sep 15, 2019 · 0 comments

Comments

@hzl123456
Copy link

error
C:\Users\15760\Desktop\vpn-demo>npm install openvpn-bin --save

runas@3.1.1 install C:\Users\15760\Desktop\vpn-demo\node_modules\runas
node-gyp rebuild

C:\Users\15760\Desktop\vpn-demo\node_modules\runas>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else
(node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“-m”开关。
main.cc
runas_win.cc
win_delay_load_hook.cc
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(19,49): error C2440: “”: 无法从“v8::Localv8::Value”转换为“v8::String::Utf8Value” [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\run
as.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(19,49): message : 无构造函数可以接受源类型,或构造函数重载决策不明确 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(27,54): error C2440: “”: 无法从“v8::Localv8::Value”转换为“v8::String::Utf8Value” [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\run
as.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(27,54): message : 无构造函数可以接受源类型,或构造函数重载决策不明确 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(32,47): error C2661: “v8::Value::ToObject”: 没有重载函数接受 0 个参数 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(34,6): error C2661: “v8::Value::BooleanValue”: 没有重载函数接受 0 个参数 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(36,6): error C2661: “v8::Value::BooleanValue”: 没有重载函数接受 0 个参数 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(41,43): error C2440: “”: 无法从“v8::Localv8::Value”转换为“v8::String::Utf8Value” [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\run
as.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(41,43): message : 无构造函数可以接受源类型,或构造函数重载决策不明确 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(45,45): error C2661: “v8::Value::BooleanValue”: 没有重载函数接受 0 个参数 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(70,11): error C2065: “Handle”: 未声明的标识符 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(70,24): error C2275: “v8::Object”: 将此类型用作表达式非法 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj]
C:\Users\15760\AppData\Local\node-gyp\Cache\12.10.0\include\node\v8.h(3369): message : 参见“v8::Object”的声明 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(70,26): error C2065: “exports”: 未声明的标识符 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(70,33): error C2182: “Init”: 非法使用“void”类型 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj]
C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(70,35): error C2448: “anonymous-namespace'::Init”: 函数样式初始值设定项类似函数定义 [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj] C:\Users\15760\Desktop\vpn-demo\node_modules\runas\src\main.cc(76,1): warning C4312: “类型强制转换”: 从“int”转换到更大的“node::addon_register_func” [C:\Users\15760\Desktop\vpn-demo\node_modules\runas\build\runas.vcxproj] gyp ERR! build error gyp ERR! stack Error: D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:209:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\15760\Desktop\vpn-demo\node_modules\runas
gyp ERR! node -v v12.10.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm WARN @typescript-eslint/eslint-plugin@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @typescript-eslint/parser@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp@1.1.2 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install pee
r dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! runas@3.1.1 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the runas@3.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\15760\AppData\Roaming\npm-cache_logs\2019-09-15T06_47_07_691Z-debug.log

@hzl123456 hzl123456 reopened this Sep 15, 2019
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

1 participant