微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

我无法构建 vscode

如何解决我无法构建 vscode

我对 vscode 感兴趣,我下载了源代码但无法运行它。 我是通过以下方式做到的。

  1. 使用 git clone 下载源代码

  2. 安装 python3.9 和 Node.js

  3. npm install --global windows-build-tools --vs2017 安装失败。所以我用巧克力安装了它

  4. 在命令提示符下用 cd 指定重复的 vscode 路径。 (例如:cd c: \ vscode

  5. 运行纱线 这是纱线日志。

    warning ..\..\..\..\package.json: No license field
    $ node build/npm/preinstall.js
    [1/4] Resolving packages...
    [2/4] Fetching packages...
    info fsevents@2.3.1: The platform "win32" is incompatible with this module.
    info "fsevents@2.3.1" is an optional dependency and Failed compatibility check. Excluding it from installation.
    info fsevents@2.1.1: The platform "win32" is incompatible with this module.
    info "fsevents@2.1.1" is an optional dependency and Failed compatibility check. Excluding it from installation.
    info fsevents@1.2.13: The platform "win32" is incompatible with this module.
    info "fsevents@1.2.13" is an optional dependency and Failed compatibility check. Excluding it from installation.
    info fsevents@2.1.3: The platform "win32" is incompatible with this module.
    info "fsevents@2.1.3" is an optional dependency and Failed compatibility check. Excluding it from installation.
    [3/4] Linking dependencies...
    warning " > eslint-plugin-header@3.1.1" has incorrect peer dependency "eslint@>=7.7.0".
    warning " > gulp-postcss@9.0.0" has unmet peer dependency "postcss@^8.0.0".
    warning " > gulp-tsb@4.0.6" has incorrect peer dependency "typescript@^3.0.0".
    warning " > sinon-test@3.1.0" has incorrect peer dependency "sinon@2.x - 10.x".
    [4/4] Building fresh packages...
    [1/19] ⠐ keytar                                                                                                                                                                              [2/19] ⠐ native-is-elevated                                                                                                                                                                  [3/19] ⠐ native-keymap                                                                                                                                                                       [4/19] ⠈ native-watchdog                                                                                                                                                                     error C:\vscode\vscode\node_modules\native-watchdog: Command Failed.                                                                                       Exit code: 6
    Command: node-gyp rebuild
    Arguments:
    Directory: C:vscode\vscode\node_modules\native-watchdog
    Output:
    C:vscode\vscode\node_modules\native-watchdog>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@7.1.2
    gyp info using node@16.4.2 | win32 | x64
    gyp info find Python using Python version 3.9.6 found at "C:\python39\python.exe"
    gyp http GET https://electronjs.org/headers/v12.0.13/node-v12.0.13-headers.tar.gz
    gyp http 200 https://electronjs.org/headers/v12.0.13/node-v12.0.13-headers.tar.gz
    gyp ERR! Completion callback never invoked!
    gyp ERR! System Windows_NT 10.0.19043
    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:vscode\vscode\node_modules\native-watchdog
    gyp ERR! node -v v16.4.
    

请告诉我如何构建 vscode 并修复这些错误。 此错误也在 C: \vscode\script\build.bat 中发生。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。