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

部署遇到问题@a@ #3

Closed
luojunyuan opened this issue Apr 15, 2019 · 5 comments
Closed

部署遇到问题@a@ #3

luojunyuan opened this issue Apr 15, 2019 · 5 comments

Comments

@luojunyuan
Copy link
Contributor

PS C:\Users\ljy77\3D Objects\Yagt> yarn
yarn install v1.15.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
info idb-connector@1.1.8: The platform "win32" is incompatible with this module.
info "idb-connector@1.1.8" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/5] ⠐ electron-vibrancy
[2/5] ⠐ ref
[3/5] ⠐ electron
[4/5] ⠈ electron-chromedriver
error C:\Users\ljy77\3D Objects\Yagt\node_modules\electron-vibrancy: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\Users\ljy77\3D Objects\Yagt\node_modules\electron-vibrancy
Output:
C:\Users\ljy77\3D Objects\Yagt\node_modules\electron-vibrancy>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.3 | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\ljy77\AppData\Local\Programs\Python\Python37\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Windows_NT 10.0.17763
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\ljy77\3D Objects\Yagt\node_modules\electron-vibrancy


说是这句 import sys; print "%s.%s.%s" % sys.version_info[:3]; 语法错误

@luojunyuan luojunyuan changed the title 生成遇到问题@a@ 部署遇到问题@a@ Apr 15, 2019
@luojunyuan
Copy link
Contributor Author

我用npm切换py2部署,又出现别的问题
image

请问该怎么解决呀QAQ
2019-04-15T18_02_41_329Z-debug.log

@tinyAdapter
Copy link
Member

有装VS么?装了的话勾上C++开发环境。
这段是在使用node-gyp编译nodejs的本地插件(C++编写,一些涉及操作系统底层调用的操作必须这样搞),Win下的话需要MSBuild编译器。

@tinyAdapter
Copy link
Member

手贱点到了close issue,8好意思😂

@luojunyuan
Copy link
Contributor Author

有装VS么?装了的话勾上C++开发环境。
这段是在使用node-gyp编译nodejs的本地插件(C++编写,一些涉及操作系统底层调用的操作必须这样搞),Win下的话需要MSBuild编译器。

感谢,运行成功了!装了三个win10 sdk和生成工具,不需要手动装node-gyp我却折腾半天各种踩坑从下午八点弄到现在(

@luojunyuan
Copy link
Contributor Author

luojunyuan commented May 12, 2019

记录一下
换了vs2019,node-gyp还认不得,若出现找不到路径下的msbuild #node-gyp/1663 是临时解决方案
官方给出的 windows-build-tools 安装方案

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

2 participants