opensumi / ide-electron

OpenSumi Electron Version
https://opensumi.com
MIT License
176 stars 60 forks source link

what the Error... on win10 #3

Closed iT-lijun closed 2 years ago

iT-lijun commented 2 years ago

E:\front-end\ide-electron>yarn yarn install v1.22.10 [1/4] Resolving packages... warning Resolution field "requestretry@6.0.0" is incompatible with requested version "requestretry@^5.0.0" warning Resolution field "y18n@5.0.5" is incompatible with requested version "y18n@^4.0.0" [2/4] Fetching packages... info dmg-license@1.0.10: The platform "win32" is incompatible with this module. info "dmg-license@1.0.10" is an optional dependency and failed compatibility check. Excluding it from installation. info iconv-corefoundation@1.1.7: The platform "win32" is incompatible with this module. info "iconv-corefoundation@1.1.7" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@2.3.2: The platform "win32" is incompatible with this module. info "fsevents@2.3.2" 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. [3/4] Linking dependencies... warning "@opensumi/ide-addons > @opensumi/ide-core-node > @opensumi/ide-connection > @opensumi/ide-components > @ant-design/icons@4.7.0" has unmet peer dependency "react@>=16.0.0". warning "@opensumi/ide-addons > @opensumi/ide-core-node > @opensumi/ide-connection > @opensumi/ide-components > react-virtualized-auto-sizer@1.0.6" has unmet peer dependency "react@^15.3.0 || ^16.0.0-alpha || ^17.0.0". warning "@opensumi/ide-addons > @opensumi/ide-core-node > @opensumi/ide-connection > @opensumi/ide-components > @ant-design/icons > rc-util@5.17.0" has unmet peer dependency "react@>=16.9.0". warning "@opensumi/ide-comments > react-mentions@3.3.2" has unmet peer dependency "react@16.x". warning " > mobx-react-lite@1.5.2" has unmet peer dependency "react@^16.8.0". warning "@opensumi/ide-comments > react-mentions > substyle@6.3.1" has unmet peer dependency "react@>=15.3.2". warning " > @typescript-eslint/eslint-plugin@4.33.0" has unmet peer dependency "@typescript-eslint/parser@^4.0.0". warning " > react-dom@16.14.0" has unmet peer dependency "react@^16.14.0". [4/4] Building fresh packages... [6/8] ⠐ electron [7/8] ⠐ node-pty [3/8] ⠐ drivelist [4/8] ⠐ nsfw error E:\front-end\ide-electron\node_modules\spdlog: Command failed. Exit code: 1 Command: node-gyp rebuild Arguments: Directory: E:\front-end\ide-electron\node_modules\spdlog Output: E:\front-end\ide-electron\node_modules\spdlog>if not defined npm_config_node_gyp (node "D:\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@5.1.0 gyp info using node@14.4.0 | win32 | x64 gyp info find Python using Python version 3.9.6 found at "D:\Python39\python.exe" gyp ERR! find VS gyp ERR! find VS msvs_version not set from command line or npm config gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer gyp ERR! find VS looking for Visual Studio 2015 gyp ERR! find VS - not found gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 gyp ERR! find VS gyp ERR! find VS ** gyp ERR! find VS You need to install the latest version of Visual Studio gyp ERR! find VS including the "Desktop development with C++" workload. gyp ERR! find VS For more information consult the documentation at: gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows gyp ERR! find VS ** gyp ERR! find VS gyp ERR! configure error gyp ERR! stack Error: Could not find any Visual Studio installation to use gyp ERR! stack at VisualStudioFinder.fail (D:\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47) gyp ERR! stack at D:\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16 gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (D:\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14) gyp ERR! stack at D:\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14 gyp ERR! stack at D:\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16 gyp ERR! stack at D:\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 gyp ERR! stack at D:\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 gyp ERR! stack at ChildProcess.exithandler (child_process.js:310:5) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at maybeClose (internal/child_process.js:1051:16) gyp ERR! System Windows_NT 10.0.18363 gyp ERR! command "D:\nodejs\node.exe" "D:\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd E:\front-end\ide-electron\node_modules\spdlog

yantze commented 2 years ago

看起来是没有装 Windows 的编译工具链。通过 npm install -g windows-build-tool 安装后再进行安装就能正常安装依赖。

yantze commented 2 years ago

或者重新在 Node.js 官网安装 Node.js ,安装引导界面会有自动安装编译工具的选项: image

yaoyunhao commented 2 years ago

C:\Users\46298\Desktop\et_upper4>npm install npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated @opensumi/vscode-ripgrep@1.4.0: Please use @opensumi/ripgrep instead npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated dmg-license@1.0.11: Disk image license agreements are deprecated by Apple and will probably be removed in a future macOS release. Discussion at: https://github.com/argv-minus-one/dmg-license/issues/11 npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead

node-pty@0.11.0-beta19 install C:\Users\46298\Desktop\et_upper4\node_modules\node-pty node scripts/install.js

C:\Users\46298\Desktop\et_upper4\node_modules\node-pty>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 ) gyp ERR! find VS gyp ERR! find VS msvs_version was set from command line or npm config gyp ERR! find VS - looking for Visual Studio version 2019 gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt gyp ERR! find VS checking VS2017 (15.9.28307.1974) found at: gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise" gyp ERR! find VS - found "Visual Studio C++ core features" gyp ERR! find VS - found VC++ toolset: v141 gyp ERR! find VS - found Windows SDK: 10.0.17763.0 gyp ERR! find VS - msvs_version does not match this version gyp ERR! find VS checking VS2017 (15.9.28307.1974) found at: gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools" gyp ERR! find VS - found "Visual Studio C++ core features" gyp ERR! find VS - found VC++ toolset: v141 gyp ERR! find VS - found Windows SDK: 10.0.17763.0 gyp ERR! find VS - msvs_version does not match this version gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use gyp ERR! find VS looking for Visual Studio 2015 gyp ERR! find VS - not found gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 gyp ERR! find VS gyp ERR! find VS valid versions for msvs_version: gyp ERR! find VS - "2017" gyp ERR! find VS - "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise" gyp ERR! find VS - "2017" gyp ERR! find VS - "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools" gyp ERR! find VS gyp ERR! find VS ** gyp ERR! find VS You need to install the latest version of Visual Studio gyp ERR! find VS including the "Desktop development with C++" workload. gyp ERR! find VS For more information consult the documentation at: gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows gyp ERR! find VS ** gyp ERR! find VS gyp ERR! configure error gyp ERR! stack Error: Could not find any Visual Studio installation to use gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16 gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14 gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16 gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 gyp ERR! stack at ChildProcess.exithandler (child_process.js:315:5) gyp ERR! stack at ChildProcess.emit (events.js:314:20) gyp ERR! stack at maybeClose (internal/child_process.js:1022:16) 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:\Users\46298\Desktop\et_upper4\node_modules\node-pty gyp ERR! node -v v12.22.10 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm WARN notsup Unsupported engine for copy-webpack-plugin@11.0.0: wanted: {"node":">= 14.15.0"} (current: {"node":"12.22.10","npm":"6.14.16"}) npm WARN notsup Not compatible with your version of node/npm: copy-webpack-plugin@11.0.0 npm WARN notsup Unsupported engine for electron-builder@23.0.3: wanted: {"node":">=14.0.0"} (current: {"node":"12.22.10","npm":"6.14.16"}) npm WARN notsup Not compatible with your version of node/npm: electron-builder@23.0.3 npm WARN notsup Unsupported engine for less-loader@11.0.0: wanted: {"node":">= 14.15.0"} (current: {"node":"12.22.10","npm":"6.14.16"}) npm WARN notsup Not compatible with your version of node/npm: less-loader@11.0.0 npm WARN notsup Unsupported engine for app-builder-lib@23.0.3: wanted: {"node":">=14.0.0"} (current: {"node":"12.22.10","npm":"6.14.16"}) npm WARN notsup Not compatible with your version of node/npm: app-builder-lib@23.0.3 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: dmg-license@^1.0.9 (node_modules\dmg-builder\node_modules\dmg-license): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for dmg-license@1.0.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iconv-corefoundation@^1.1.7 (node_modules\dmg-license\node_modules\iconv-corefoundation): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for iconv-corefoundation@1.1.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN xterm-addon-fit@0.5.0 requires a peer of xterm@^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN xterm-addon-search@0.9.0-beta.16 requires a peer of xterm@^4.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-pty@0.11.0-beta19 install: node scripts/install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-pty@0.11.0-beta19 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\46298\AppData\Roaming\npm-cache_logs\2022-06-14T03_31_59_477Z-debug.log

下载依赖时报这个错误是什么原因?