opensumi / ide-electron

OpenSumi Electron Version
https://opensumi.com
MIT License
171 stars 56 forks source link

桌面版 ide-electron 项目打包失败 #66

Closed zt6991 closed 1 year ago

zt6991 commented 1 year ago

1.克隆下ide-electron仓库 git clone git@github.com:opensumi/ide-electron.git 2.pnpm 3.pnpm build 4.pnpm run pack

以下为报错现象:

webpack 5.74.0 compiled with 4 warnings in 123685 ms • electron-builder version=23.3.3 os=10.0.19045 • author is missed in the package.json appPackageFile=C:\Users\zhengtao\Desktop\new\ide-electron\app\package.json • installing production dependencies platform=win32 arch=x64 appDir=C:\Users\zhengtao\Desktop\new\ide-electron\app

C:\Users\zhengtao\Desktop\new\ide-electron\node_modules.pnpm\builder-util@23.3.3\node_modules\builder-util\src\util.ts:250 reject(new ExecError(command, code, out, errorOut)) ^ Error: D:\node_js\node.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE Exit code: 1 Output: Progress: resolved 1, reused 0, downloaded 0, added 0  WARN  deprecated @opensumi/vscode-ripgrep@1.4.0: Please use @opensumi/ripgrep instead Packages: +13 +++++++++++++ Packages are hard linked from the content-addressable store to the virtual store. Content-addressable store is at: C:\Users\zhengtao\AppData\Local\pnpm\store\v3 Virtual store is at: node_modules/.pnpm .../node_modules/node-pty install$ node scripts/install.js .../spdlog@0.11.1/node_modules/spdlog install$ node-gyp rebuild .../spdlog@0.11.1/node_modules/spdlog install: C:\Users\zhengtao\Desktop\new\ide-electron\app\node_modules.pnpm\spdlog@0.11.1\node_modules\spdlog>if not defined npm_config_node_gyp (node "C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node-gyp-bin\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\bin\node-gyp.js" rebuild ) .../node_modules/node-pty install: C:\Users\zhengtao\Desktop\new\ide-electron\app\node_modules.pnpm\node-pty@0.10.0\node_modules\node-pty>if not defined npm_config_node_gyp (node "C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node-gyp-bin\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\bin\node-gyp.js" rebuild )

yantze commented 1 year ago

看起来像是 electron 下载失败了,切换到 main-cn 分支安装一下依赖

zt6991 commented 1 year ago

目前已经是切到mian-cn的分支了

zt6991 commented 1 year ago

1679644357108

yantze commented 1 year ago

复制一下完整的错误,上面的内容只看到在 rebuild ,后续的输出没有

zt6991 commented 1 year ago

warning ......\package.json: No license field success Wrote tarball to "C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\ide-electron-v1.0.0.tgz". Done in 3.57s. PS C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main> yarn run pack yarn run v1.22.19 warning ......\package.json: No license field $ pnpm build-prod && node build/pack.js

ide-electron@1.0.0 build-prod C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main rimraf -rf ./app && rimraf -rf ./out && run-p build-prod:*

ide-electron@1.0.0 build-prod:browser C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main webpack --config ./build/webpack.browser.config.js --mode=production

ide-electron@1.0.0 build-prod:node C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main webpack --config ./build/webpack.node.config.js --mode=production

ide-electron@1.0.0 build-prod:main C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main webpack --config ./build/webpack.main.config.js --mode=production

ide-electron@1.0.0 build-prod:extension C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main webpack --config ./build/webpack.extension-host.config.js --mode=production

ide-electron@1.0.0 build-prod:webview C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main webpack --config ./build/webpack.webview.config.js --mode=production

asset host-preload.js 9.66 KiB [emitted] [minimized] (name: main) 1 related asset asset plain-preload.js 997 bytes [emitted] [from: node_modules/@opensumi/ide-webview/lib/electron-webview/plain-preload.js] [copied] [minimized] modules by path ./node_modules/@opensumi/ide-webview/lib/electron-webview/.js 2.12 KiB ./node_modules/@opensumi/ide-webview/lib/electron-webview/host-preload.js 54 bytes [built] [code generated] ./node_modules/@opensumi/ide-webview/lib/electron-webview/host-channel.js 2.07 KiB [built] [code generated] modules by path ./node_modules/@opensumi/ide-webview/lib/webview-host/.js 15.9 KiB ./node_modules/@opensumi/ide-webview/lib/webview-host/webview-manager.js 13.3 KiB [built] [code generated] ./node_modules/@opensumi/ide-webview/lib/webview-host/common.js 2.62 KiB [built] [code generated] external "electron" 42 bytes [built] [code generated] webpack 5.76.1 compiled successfully in 1229 ms asset index.js 769 KiB [emitted] [minimized] (name: main) 1 related asset asset 132.index.js 323 KiB [emitted] [minimized] (id hint: vendors) runtime modules 3.17 KiB 7 modules modules by path ./node_modules/ 2.04 MiB javascript modules 1.96 MiB 389 modules json modules 86.7 KiB ./node_modules/iconv-lite/encodings/tables/shiftjis.json 8.78 KiB [built] [code generated] ./node_modules/iconv-lite/encodings/tables/eucjp.json 15.1 KiB [built] [code generated]

WARNING in ./node_modules/vscode-languageserver-types/lib/umd/main.js 3:24-31 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@opensumi/ide-extension/lib/common/vscode/converter.js 6:38-76 @ ./node_modules/@opensumi/ide-extension/lib/hosted/api/vscode/ext.host.command.js 7:50-93 @ ./node_modules/@opensumi/ide-extension/lib/hosted/api/vscode/ext.host.api.impl.js 18:27-56 @ ./node_modules/@opensumi/ide-extension/lib/hosted/ext.host.js 13:28-69 @ ./node_modules/@opensumi/ide-extension/lib/hosted/ext.process-base.js 71:22-43 @ ./src/extension/index.ts 3:30-95

WARNING in ./node_modules/ws/lib/buffer-util.js 117:23-44 Module not found: Error: Can't resolve 'bufferutil' in 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\ws\lib' @ ./node_modules/ws/lib/websocket.js 31:21-45 @ ./node_modules/ws/index.js 3:18-44 @ ./node_modules/@opensumi/ide-connection/lib/node/common-channel-handler.js 6:37-50 @ ./node_modules/@opensumi/ide-connection/lib/node/index.js 9:21-56 @ ./node_modules/@opensumi/ide-extension/lib/hosted/ext.process-base.js 9:15-59 @ ./src/extension/index.ts 3:30-95

WARNING in ./node_modules/ws/lib/validation.js 122:24-49 Module not found: Error: Can't resolve 'utf-8-validate' in 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\ws\lib' @ ./node_modules/ws/lib/receiver.js 13:43-66 @ ./node_modules/ws/index.js 7:21-46 @ ./node_modules/@opensumi/ide-connection/lib/node/common-channel-handler.js 6:37-50 @ ./node_modules/@opensumi/ide-connection/lib/node/index.js 9:21-56 @ ./node_modules/@opensumi/ide-extension/lib/hosted/ext.process-base.js 9:15-59 @ ./src/extension/index.ts 3:30-95

3 warnings have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.76.1 compiled with 3 warnings in 33273 ms

asset index.worker.js 1.63 MiB [emitted] [minimized] [big] (name: main) 1 related asset asset 132.index.worker.js 323 KiB [emitted] [minimized] [big] (id hint: vendors) runtime modules 4.44 KiB 10 modules orphan modules 110 bytes [orphan] 1 module modules by path ./node_modules/@opensumi/ 2.51 MiB 441 modules modules by path ./node_modules/lodash/*.js 78.4 KiB 114 modules modules by path ./node_modules/jschardet/ 451 KiB 43 modules modules by path ./node_modules/iconv-lite/ 198 KiB 21 modules modules by path ./node_modules/vscode-languageserver-types/lib/umd/ 90 KiB 2 modules modules by path ./node_modules/react/ 6.7 KiB ./node_modules/react/index.js 190 bytes [built] [code generated] ./node_modules/react/cjs/react.production.min.js 6.52 KiB [built] [code generated] modules by path ./node_modules/string_decoder/ 10.7 KiB ./node_modules/string_decoder/lib/string_decoder.js 9.24 KiB [built] [code generated] ./node_modules/string_decoder/node_modules/safe-buffer/index.js 1.49 KiB [built] [code generated]

WARNING in ./node_modules/vscode-languageserver-types/lib/umd/main.js 3:24-31 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@opensumi/ide-extension/lib/common/vscode/converter.js 6:38-76 @ ./node_modules/@opensumi/ide-extension/lib/hosted/api/vscode/ext.host.comments.js 12:50-93 @ ./node_modules/@opensumi/ide-extension/lib/hosted/api/worker/worker.host.api.impl.js 18:28-66 @ ./node_modules/@opensumi/ide-extension/lib/hosted/worker.host.js 12:31-75 @ ./node_modules/@opensumi/ide-extension/lib/hosted/worker.host-preload.js 8:22-46 @ ./src/extension/index.worker.ts 3:0-65

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). This can impact web performance. Assets: index.worker.js (1.63 MiB) 132.index.worker.js (323 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints: main (1.63 MiB) index.worker.js

1 warning has detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.76.1 compiled with 3 warnings in 29264 ms asset index.js 2.82 MiB [emitted] [minimized] (name: main) 1 related asset asset 967.index.js 342 KiB [emitted] [minimized] (id hint: vendors) 1 related asset asset 132.index.js 323 KiB [emitted] [minimized] (id hint: vendors) runtime modules 3.29 KiB 8 modules javascript modules 5.11 MiB modules by path ./node_modules/ 5.1 MiB cacheable modules 5.1 MiB 1057 modules

WARNING in ./node_modules/@opensumi/ide-extension/lib/node/languagePack.js 292:25-32 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@opensumi/ide-extension/lib/node/extension.service.client.js 13:32-57 @ ./node_modules/@opensumi/ide-extension/lib/node/index.js 11:35-72 @ ./src/node/index.ts 12:15-58

WARNING in ./node_modules/chrome-remote-interface/node_modules/ws/lib/BufferUtil.js 35:21-42 Module not found: Error: Can't resolve 'bufferutil' in 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\chrome-remote-interface\node_modules\ws\lib' Did you mean './bufferutil'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too. @ ./node_modules/chrome-remote-interface/node_modules/ws/lib/Receiver.js 13:19-42 @ ./node_modules/chrome-remote-interface/node_modules/ws/index.js 12:21-46 @ ./node_modules/chrome-remote-interface/lib/chrome.js 7:18-31 @ ./node_modules/chrome-remote-interface/index.js 6:15-41 @ ./node_modules/v8-inspect-profiler/index.js 10:12-46 @ ./node_modules/@opensumi/ide-extension/lib/node/extension.profiler.service.js 34:31-60 @ ./node_modules/@opensumi/ide-extension/lib/node/index.js 9:37-76 @ ./src/node/index.ts 12:15-58

WARNING in ./node_modules/chrome-remote-interface/node_modules/ws/lib/Validation.js 10:22-47 Module not found: Error: Can't resolve 'utf-8-validate' in 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\chrome-remote-interface\node_modules\ws\lib' @ ./node_modules/chrome-remote-interface/node_modules/ws/lib/Receiver.js 12:20-43 @ ./node_modules/chrome-remote-interface/node_modules/ws/index.js 12:21-46 @ ./node_modules/chrome-remote-interface/lib/chrome.js 7:18-31 @ ./node_modules/chrome-remote-interface/index.js 6:15-41 @ ./node_modules/v8-inspect-profiler/index.js 10:12-46 @ ./node_modules/@opensumi/ide-extension/lib/node/extension.profiler.service.js 34:31-60 @ ./node_modules/@opensumi/ide-extension/lib/node/index.js 9:37-76 @ ./src/node/index.ts 12:15-58

WARNING in ./node_modules/vscode-languageserver-types/lib/umd/main.js 3:24-31 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@opensumi/ide-file-service/lib/node/file-service.js 8:38-76 @ ./node_modules/@opensumi/ide-file-service/lib/node/index.js 9:23-48 10:21-46 @ ./src/node/index.ts 6:15-61

WARNING in ./node_modules/ws/lib/buffer-util.js 117:23-44 Module not found: Error: Can't resolve 'bufferutil' in 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\ws\lib' @ ./node_modules/ws/lib/sender.js 12:38-62 @ ./node_modules/ws/index.js 8:19-42 @ ./node_modules/@opensumi/ide-connection/lib/node/common-channel-handler.js 6:37-50 @ ./node_modules/@opensumi/ide-connection/lib/node/index.js 9:21-56 @ ./node_modules/@opensumi/ide-core-node/lib/connection.js 7:15-59 @ ./node_modules/@opensumi/ide-core-node/lib/index.js 6:21-44 @ ./src/node/index.ts 5:24-58

WARNING in ./node_modules/ws/lib/validation.js 122:24-49 Module not found: Error: Can't resolve 'utf-8-validate' in 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\ws\lib' @ ./node_modules/ws/lib/sender.js 11:30-53 @ ./node_modules/ws/index.js 8:19-42 @ ./node_modules/@opensumi/ide-connection/lib/node/common-channel-handler.js 6:37-50 @ ./node_modules/@opensumi/ide-connection/lib/node/index.js 9:21-56 @ ./node_modules/@opensumi/ide-core-node/lib/connection.js 7:15-59 @ ./node_modules/@opensumi/ide-core-node/lib/index.js 6:21-44 @ ./src/node/index.ts 5:24-58

WARNING in ./node_modules/yargs/build/index.cjs 1:60888-60895 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/yargs/index.cjs 5:29-57 @ ./src/node/server.ts 6:35-51 @ ./src/node/index.ts 4:17-36

WARNING in ./node_modules/yargs/build/index.cjs 1:61280-61287 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/yargs/index.cjs 5:29-57 @ ./src/node/server.ts 6:35-51 @ ./src/node/index.ts 4:17-36

WARNING in ./node_modules/yargs/index.cjs 12:39-46 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./src/node/server.ts 6:35-51 @ ./src/node/index.ts 4:17-36

9 warnings have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.76.1 compiled with 9 warnings in 36822 ms assets by info 739 KiB [immutable] 68 assets assets by path ../ 16.3 KiB 53 assets assets by path *.ts 2.64 KiB asset project.d.ts 1.09 KiB [emitted] asset commands.d.ts 468 bytes [emitted] asset module.d.ts 391 bytes [emitted] asset app.d.ts 281 bytes [emitted]

WARNING in ./node_modules/@opensumi/monaco-editor-core/esm/vs/base/common/performance.js 81:34-41 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@opensumi/monaco-editor-core/esm/vs/platform/storage/common/storage.js 20:22-65 @ ./node_modules/@opensumi/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js 102:18-69 @ ./node_modules/@opensumi/ide-monaco/lib/browser/monaco.contribution.js 18:29-120 19:29-120 @ ./node_modules/@opensumi/ide-monaco/lib/browser/index.js 10:30-62 @ ./src/browser/index.ts 18:18-61

WARNING in ./node_modules/@opensumi/monaco-editor-core/esm/vs/base/common/performance.js 81:57-64 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@opensumi/monaco-editor-core/esm/vs/platform/storage/common/storage.js 20:22-65 @ ./node_modules/@opensumi/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js 102:18-69 @ ./node_modules/@opensumi/ide-monaco/lib/browser/monaco.contribution.js 18:29-120 19:29-120 @ ./node_modules/@opensumi/ide-monaco/lib/browser/index.js 10:30-62 @ ./src/browser/index.ts 18:18-61

2 warnings have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.76.1 compiled with 2 warnings in 141557 ms • electron-builder version=23.6.0 os=10.0.19045 • author is missed in the package.json appPackageFile=C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\package.json • writing effective config file=out\builder-effective-config.yaml • installing production dependencies platform=win32 arch=x64 appDir=C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app

C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\builder-util\src\util.ts:250 reject(new ExecError(command, code, out, errorOut)) ^ Error: D:\node_js\node.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE Exit code: 1 Output: info No lockfile found. [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Error output: warning ........\package.json: No license field warning @opensumi/vscode-ripgrep@1.4.0: Please use @opensumi/ripgrep instead warning spdlog@0.11.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. error C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\spdlog: Command failed. Exit code: 1 Command: node-gyp rebuild Arguments: Directory: C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\spdlog Output: C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\spdlog>if not defined npm_config_node_gyp (node "D:\node_js\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@9.3.1 gyp info using node@18.15.0 | win32 | x64 gyp info find Python using Python version 3.10.3 found at "C:\Users\zhengtao\AppData\Local\Programs\Python\Python310\python.exe" gyp info find VS using VS2019 (16.11.32228.343) found at: gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" gyp info find VS run with --verbose for detailed information gyp info spawn C:\Users\zhengtao\AppData\Local\Programs\Python\Python310\python.exe gyp info spawn args [ gyp info spawn args 'D:\node_js\node_modules\npm\node_modules\node-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 '-I', gyp info spawn args 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\spdlog\build\config.gypi', gyp info spawn args '-I', gyp info spawn args 'D:\node_js\node_modules\npm\node_modules\node-gyp\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\zhengtao\.electron-gyp\18.3.4\include\node\common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\Users\zhengtao\.electron-gyp\18.3.4', gyp info spawn args '-Dnode_gyp_dir=D:\node_js\node_modules\npm\node_modules\node-gyp', gyp info spawn args '-Dnode_lib_file=C:\\Users\\zhengtao\\.electron-gyp\\18.3.4\\<(target_arch)\\node.lib', gyp info spawn args '-Dmodule_root_dir=C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\spdlog', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\spdlog\build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe gyp info spawn args [ 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' gyp info spawn args ] �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�-m�����ء� main.cc C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\nan\nan.h(59,10): fatal error C1083: �޷��򿪰����ļ�: ��uv.h��: No such file or directory [C:\ Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\spdlog\build\spdlog.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (D:\node_js\node_modules\npm\node_modules\node-gyp\lib\build.js:203:23) gyp ERR! stack at ChildProcess.emit (node:events:513:28) gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12) gyp ERR! System Windows_NT 10.0.19045 gyp ERR! command "D:\node_js\node.exe" "D:\node_js\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\spdlog gyp ERR! node -v v18.15.0 gyp ERR! node-gyp -v v9.3.1 gyp ERR! not ok

at ChildProcess.<anonymous> (C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\builder-util\src\util.ts:250:14)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.cp.emit (C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1091:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

yantze commented 1 year ago

在命令行输入 chcp 65001 ,再次执行 pnpm run pack,乱码会改为中文显示。另外执行一下 pnpm info nan 看下 nan 是什么版本

zt6991 commented 1 year ago

image

zt6991 commented 1 year ago

PS C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main> pnpm run pack

ide-electron@1.0.0 pack C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main pnpm build-prod && node build/pack.js

ide-electron@1.0.0 build-prod C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main rimraf -rf ./app && rimraf -rf ./out && run-p build-prod:*

ide-electron@1.0.0 build-prod:browser C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main webpack --config ./build/webpack.browser.config.js --mode=production

ide-electron@1.0.0 build-prod:node C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main webpack --config ./build/webpack.node.config.js --mode=production

ide-electron@1.0.0 build-prod:extension C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main webpack --config ./build/webpack.extension-host.config.js --mode=production

ide-electron@1.0.0 build-prod:main C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main webpack --config ./build/webpack.main.config.js --mode=production

ide-electron@1.0.0 build-prod:webview C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main webpack --config ./build/webpack.webview.config.js --mode=production

asset host-preload.js 9.66 KiB [emitted] [minimized] (name: main) 1 related asset asset plain-preload.js 997 bytes [emitted] [from: node_modules/@opensumi/ide-webview/lib/electron-webview/plain-preload.js] [copied] [minimized] modules by path ./node_modules/@opensumi/ide-webview/lib/electron-webview/.js 2.12 KiB ./node_modules/@opensumi/ide-webview/lib/electron-webview/host-preload.js 54 bytes [built] [code generated] ./node_modules/@opensumi/ide-webview/lib/electron-webview/host-channel.js 2.07 KiB [built] [code generated] modules by path ./node_modules/@opensumi/ide-webview/lib/webview-host/.js 15.9 KiB ./node_modules/@opensumi/ide-webview/lib/webview-host/webview-manager.js 13.3 KiB [built] [code generated] ./node_modules/@opensumi/ide-webview/lib/webview-host/common.js 2.62 KiB [built] [code generated] external "electron" 42 bytes [built] [code generated] webpack 5.76.1 compiled successfully in 1237 ms asset index.js 769 KiB [emitted] [minimized] (name: main) 1 related asset asset 132.index.js 323 KiB [emitted] [minimized] (id hint: vendors) runtime modules 3.17 KiB 7 modules modules by path ./node_modules/ 2.04 MiB javascript modules 1.96 MiB 389 modules json modules 86.7 KiB ./node_modules/iconv-lite/encodings/tables/shiftjis.json 8.78 KiB [built] [code generated] ./node_modules/iconv-lite/encodings/tables/eucjp.json 15.1 KiB [built] [code generated]

WARNING in ./node_modules/vscode-languageserver-types/lib/umd/main.js 3:24-31 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@opensumi/ide-extension/lib/common/vscode/converter.js 6:38-76 @ ./node_modules/@opensumi/ide-extension/lib/hosted/api/vscode/ext.host.comments.js 12:50-93 @ ./node_modules/@opensumi/ide-extension/lib/hosted/api/vscode/ext.host.api.impl.js 19:28-58 @ ./node_modules/@opensumi/ide-extension/lib/hosted/ext.host.js 13:28-69 @ ./node_modules/@opensumi/ide-extension/lib/hosted/ext.process-base.js 71:22-43 @ ./src/extension/index.ts 3:30-95

WARNING in ./node_modules/ws/lib/buffer-util.js 117:23-44 Module not found: Error: Can't resolve 'bufferutil' in 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\ws\lib' @ ./node_modules/ws/lib/websocket.js 31:21-45 @ ./node_modules/ws/index.js 3:18-44 @ ./node_modules/@opensumi/ide-connection/lib/node/common-channel-handler.js 6:37-50 @ ./node_modules/@opensumi/ide-connection/lib/node/index.js 9:21-56 @ ./node_modules/@opensumi/ide-extension/lib/hosted/ext.process-base.js 9:15-59 @ ./src/extension/index.ts 3:30-95

WARNING in ./node_modules/ws/lib/validation.js 122:24-49 Module not found: Error: Can't resolve 'utf-8-validate' in 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\ws\lib' @ ./node_modules/ws/lib/sender.js 11:30-53 @ ./node_modules/ws/index.js 8:19-42 @ ./node_modules/@opensumi/ide-connection/lib/node/common-channel-handler.js 6:37-50 @ ./node_modules/@opensumi/ide-connection/lib/node/index.js 9:21-56 @ ./node_modules/@opensumi/ide-extension/lib/hosted/ext.process-base.js 9:15-59 @ ./src/extension/index.ts 3:30-95

3 warnings have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.76.1 compiled with 3 warnings in 33751 ms

asset index.worker.js 1.63 MiB [emitted] [minimized] [big] (name: main) 1 related asset asset 132.index.worker.js 323 KiB [emitted] [minimized] [big] (id hint: vendors) runtime modules 4.44 KiB 10 modules orphan modules 110 bytes [orphan] 1 module modules by path ./node_modules/@opensumi/ 2.51 MiB 441 modules modules by path ./node_modules/lodash/*.js 78.4 KiB 114 modules modules by path ./node_modules/jschardet/ 451 KiB 43 modules modules by path ./node_modules/iconv-lite/ 198 KiB 21 modules modules by path ./node_modules/vscode-languageserver-types/lib/umd/ 90 KiB 2 modules modules by path ./node_modules/react/ 6.7 KiB ./node_modules/react/index.js 190 bytes [built] [code generated] ./node_modules/react/cjs/react.production.min.js 6.52 KiB [built] [code generated] modules by path ./node_modules/string_decoder/ 10.7 KiB ./node_modules/string_decoder/lib/string_decoder.js 9.24 KiB [built] [code generated] ./node_modules/string_decoder/node_modules/safe-buffer/index.js 1.49 KiB [built] [code generated]

WARNING in ./node_modules/vscode-languageserver-types/lib/umd/main.js 3:24-31 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@opensumi/ide-extension/lib/common/vscode/converter.js 6:38-76 @ ./node_modules/@opensumi/ide-extension/lib/hosted/api/vscode/ext.host.command.js 7:50-93 @ ./node_modules/@opensumi/ide-extension/lib/hosted/api/worker/worker.host.api.impl.js 17:27-64 @ ./node_modules/@opensumi/ide-extension/lib/hosted/worker.host.js 12:31-75 @ ./node_modules/@opensumi/ide-extension/lib/hosted/worker.host-preload.js 8:22-46 @ ./src/extension/index.worker.ts 3:0-65

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). This can impact web performance. Assets: index.worker.js (1.63 MiB) 132.index.worker.js (323 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints: main (1.63 MiB) index.worker.js

1 warning has detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.76.1 compiled with 3 warnings in 29192 ms asset index.js 2.82 MiB [emitted] [minimized] (name: main) 1 related asset asset 967.index.js 342 KiB [emitted] [minimized] (id hint: vendors) 1 related asset asset 132.index.js 323 KiB [emitted] [minimized] (id hint: vendors) runtime modules 3.29 KiB 8 modules javascript modules 5.11 MiB modules by path ./node_modules/ 5.1 MiB cacheable modules 5.1 MiB 1057 modules

WARNING in ./node_modules/@opensumi/ide-extension/lib/node/languagePack.js 292:25-32 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@opensumi/ide-extension/lib/node/extension.service.client.js 13:32-57 @ ./node_modules/@opensumi/ide-extension/lib/node/index.js 11:35-72 @ ./src/node/index.ts 12:15-58

WARNING in ./node_modules/chrome-remote-interface/node_modules/ws/lib/BufferUtil.js 35:21-42 Module not found: Error: Can't resolve 'bufferutil' in 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\chrome-remote-interface\node_modules\ws\lib' Did you mean './bufferutil'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too. @ ./node_modules/chrome-remote-interface/node_modules/ws/lib/Sender.js 13:19-42 @ ./node_modules/chrome-remote-interface/node_modules/ws/index.js 13:19-42 @ ./node_modules/chrome-remote-interface/lib/chrome.js 7:18-31 @ ./node_modules/chrome-remote-interface/index.js 6:15-41 @ ./node_modules/v8-inspect-profiler/index.js 10:12-46 @ ./node_modules/@opensumi/ide-extension/lib/node/extension.profiler.service.js 34:31-60 @ ./node_modules/@opensumi/ide-extension/lib/node/index.js 9:37-76 @ ./src/node/index.ts 12:15-58

WARNING in ./node_modules/chrome-remote-interface/node_modules/ws/lib/Validation.js 10:22-47 Module not found: Error: Can't resolve 'utf-8-validate' in 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\chrome-remote-interface\node_modules\ws\lib' @ ./node_modules/chrome-remote-interface/node_modules/ws/lib/Receiver.js 12:20-43 @ ./node_modules/chrome-remote-interface/node_modules/ws/index.js 12:21-46 @ ./node_modules/chrome-remote-interface/lib/chrome.js 7:18-31 @ ./node_modules/chrome-remote-interface/index.js 6:15-41 @ ./node_modules/v8-inspect-profiler/index.js 10:12-46 @ ./node_modules/@opensumi/ide-extension/lib/node/extension.profiler.service.js 34:31-60 @ ./node_modules/@opensumi/ide-extension/lib/node/index.js 9:37-76 @ ./src/node/index.ts 12:15-58

WARNING in ./node_modules/vscode-languageserver-types/lib/umd/main.js 3:24-31 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@opensumi/ide-file-service/lib/node/file-service.js 8:38-76 @ ./node_modules/@opensumi/ide-file-service/lib/node/index.js 9:23-48 10:21-46 @ ./src/node/index.ts 6:15-61

WARNING in ./node_modules/ws/lib/buffer-util.js 117:23-44 Module not found: Error: Can't resolve 'bufferutil' in 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\ws\lib' @ ./node_modules/ws/lib/websocket.js 31:21-45 @ ./node_modules/ws/index.js 3:18-44 @ ./node_modules/@opensumi/ide-connection/lib/node/common-channel-handler.js 6:37-50 @ ./node_modules/@opensumi/ide-connection/lib/node/index.js 9:21-56 @ ./node_modules/@opensumi/ide-core-node/lib/connection.js 7:15-59 @ ./node_modules/@opensumi/ide-core-node/lib/index.js 6:21-44 @ ./src/node/index.ts 5:24-58

WARNING in ./node_modules/ws/lib/validation.js 122:24-49 Module not found: Error: Can't resolve 'utf-8-validate' in 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\ws\lib' @ ./node_modules/ws/lib/receiver.js 13:43-66 @ ./node_modules/ws/index.js 7:21-46 @ ./node_modules/@opensumi/ide-connection/lib/node/common-channel-handler.js 6:37-50 @ ./node_modules/@opensumi/ide-connection/lib/node/index.js 9:21-56 @ ./node_modules/@opensumi/ide-core-node/lib/connection.js 7:15-59 @ ./node_modules/@opensumi/ide-core-node/lib/index.js 6:21-44 @ ./src/node/index.ts 5:24-58

WARNING in ./node_modules/yargs/build/index.cjs 1:60888-60895 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/yargs/index.cjs 5:29-57 @ ./src/node/server.ts 6:35-51 @ ./src/node/index.ts 4:17-36

WARNING in ./node_modules/yargs/build/index.cjs 1:61280-61287 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/yargs/index.cjs 5:29-57 @ ./src/node/server.ts 6:35-51 @ ./src/node/index.ts 4:17-36

WARNING in ./node_modules/yargs/index.cjs 12:39-46 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./src/node/server.ts 6:35-51 @ ./src/node/index.ts 4:17-36

9 warnings have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.76.1 compiled with 9 warnings in 37117 ms assets by info 739 KiB [immutable] 68 assets assets by path ../ 16.3 KiB 53 assets assets by path *.ts 2.64 KiB asset project.d.ts 1.09 KiB [emitted] asset commands.d.ts 468 bytes [emitted] asset module.d.ts 391 bytes [emitted] asset app.d.ts 281 bytes [emitted]

WARNING in ./node_modules/@opensumi/monaco-editor-core/esm/vs/base/common/performance.js 81:34-41 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@opensumi/monaco-editor-core/esm/vs/platform/storage/common/storage.js 20:22-65 @ ./node_modules/@opensumi/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js 102:18-69 @ ./node_modules/@opensumi/ide-monaco/lib/browser/monaco.context-key.service.js 10:29-120 @ ./node_modules/@opensumi/ide-monaco/lib/browser/index.js 8:37-76 9:37-76 @ ./src/browser/index.ts 18:18-61

WARNING in ./node_modules/@opensumi/monaco-editor-core/esm/vs/base/common/performance.js 81:57-64 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@opensumi/monaco-editor-core/esm/vs/platform/storage/common/storage.js 20:22-65 @ ./node_modules/@opensumi/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices.js 102:18-69 @ ./node_modules/@opensumi/ide-monaco/lib/browser/monaco.context-key.service.js 10:29-120 @ ./node_modules/@opensumi/ide-monaco/lib/browser/index.js 8:37-76 9:37-76 @ ./src/browser/index.ts 18:18-61

2 warnings have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.76.1 compiled with 2 warnings in 143179 ms • electron-builder version=23.6.0 os=10.0.19045 • author is missed in the package.json appPackageFile=C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\package.json • writing effective config file=out\builder-effective-config.yaml • installing production dependencies platform=win32 arch=x64 appDir=C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app

C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\builder-util\src\util.ts:250 reject(new ExecError(command, code, out, errorOut)) ^ Error: D:\node_js\node.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE Exit code: 1 Output:  WARN  deprecated @opensumi/vscode-ripgrep@1.4.0: Please use @opensumi/ripgrep instead Progress: resolved 1, reused 0, downloaded 0, added 0 Packages: +13 +++++++++++++ Packages are hard linked from the content-addressable store to the virtual store. Content-addressable store is at: C:\Users\zhengtao\AppData\Local\pnpm\store\v3 Virtual store is at: node_modules/.pnpm .../node_modules/node-pty install$ node scripts/install.js .../spdlog@0.11.1/node_modules/spdlog install$ node-gyp rebuild .../spdlog@0.11.1/node_modules/spdlog install: C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules.pnpm\spdlog@0.11.1\node_modules\spdlog>if not defined npm_config_node_gyp (node "C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node-gyp-bin\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\bin\node-gyp.js" rebuild ) Progress: resolved 13, reused 13, downloaded 0, added 13, done .../node_modules/node-pty install: C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules.pnpm\node-pty@0.10.0\node_modules\node-pty>if not defined npm_config_node_gyp (node "C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node-gyp-bin\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\bin\node-gyp.js" rebuild ) .../spdlog@0.11.1/node_modules/spdlog install: gyp info it worked if it ends with ok .../spdlog@0.11.1/node_modules/spdlog install: gyp info using node-gyp@9.3.1 .../spdlog@0.11.1/node_modules/spdlog install: gyp info using node@18.15.0 | win32 | x64 .../node_modules/node-pty install: gyp info it worked if it ends with ok .../node_modules/node-pty install: gyp info using node-gyp@9.3.1 .../node_modules/node-pty install: gyp info using node@18.15.0 | win32 | x64 .../spdlog@0.11.1/node_modules/spdlog install: gyp info find Python using Python version 3.10.3 found at "C:\Users\zhengtao\AppData\Local\Programs\Python\Python310\python.exe" .../node_modules/node-pty install: gyp info find Python using Python version 3.10.3 found at "C:\Users\zhengtao\AppData\Local\Programs\Python\Python310\python.exe".../node_modules/node-pty install: gyp info find VS using VS2019 (16.11.32228.343) found at: .../node_modules/node-pty install: gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" .../node_modules/node-pty install: gyp info find VS run with --verbose for detailed information .../spdlog@0.11.1/node_modules/spdlog install: gyp info find VS using VS2019 (16.11.32228.343) found at: .../spdlog@0.11.1/node_modules/spdlog install: gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" .../spdlog@0.11.1/node_modules/spdlog install: gyp info find VS run with --verbose for detailed information .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn C:\Users\zhengtao\AppData\Local\Programs\Python\Python310\python.exe .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args [ .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args 'C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\gyp\gyp_main.py', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args 'binding.gyp', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '-f', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args 'msvs', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '-I', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\.pnpm\spdlog@0.11.1\node_modules\spdlog\build\config.gypi', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '-I', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args 'C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\addon.gypi', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '-I', .../node_modules/node-pty install: gyp info spawn C:\Users\zhengtao\AppData\Local\Programs\Python\Python310\python.exe .../node_modules/node-pty install: gyp info spawn args [ .../node_modules/node-pty install: gyp info spawn args 'C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\gyp\gyp_main.py', .../node_modules/node-pty install: gyp info spawn args 'binding.gyp', .../node_modules/node-pty install: gyp info spawn args '-f', .../node_modules/node-pty install: gyp info spawn args 'msvs', .../node_modules/node-pty install: gyp info spawn args '-I', .../node_modules/node-pty install: gyp info spawn args 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\.pnpm\node-pty@0.10.0\node_modules\node-pty\build\config.gypi', .../node_modules/node-pty install: gyp info spawn args '-I', .../node_modules/node-pty install: gyp info spawn args 'C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\addon.gypi', .../node_modules/node-pty install: gyp info spawn args '-I', .../node_modules/node-pty install: gyp info spawn args 'C:\Users\zhengtao\.electron-gyp\18.3.4\include\node\common.gypi', .../node_modules/node-pty install: gyp info spawn args '-Dlibrary=shared_library', .../node_modules/node-pty install: gyp info spawn args '-Dvisibility=default', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args 'C:\Users\zhengtao\.electron-gyp\18.3.4\include\node\common.gypi', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '-Dlibrary=shared_library', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '-Dvisibility=default', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '-Dnode_root_dir=C:\Users\zhengtao\.electron-gyp\18.3.4', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '-Dnode_gyp_dir=C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '-Dnode_lib_file=C:\\Users\\zhengtao\\.electron-gyp\\18.3.4\\<(target_arch)\\node.lib', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '-Dmodule_root_dir=C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\.pnpm\spdlog@0.11.1\node_modules\spdlog', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '-Dnode_engine=v8', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '--depth=.', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '--no-parallel', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '--generator-output', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\.pnpm\spdlog@0.11.1\node_modules\spdlog\build', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '-Goutput_dir=.' .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args ] .../node_modules/node-pty install: gyp info spawn args '-Dnode_root_dir=C:\Users\zhengtao\.electron-gyp\18.3.4', .../node_modules/node-pty install: gyp info spawn args '-Dnode_gyp_dir=C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp', .../node_modules/node-pty install: gyp info spawn args '-Dnode_lib_file=C:\\Users\\zhengtao\\.electron-gyp\\18.3.4\\<(target_arch)\\node.lib',
.../node_modules/node-pty install: gyp info spawn args '-Dmodule_root_dir=C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\.pnpm\node-pty@0.10.0\node_modules\node-pty', .../node_modules/node-pty install: gyp info spawn args '-Dnode_engine=v8', .../node_modules/node-pty install: gyp info spawn args '--depth=.', .../node_modules/node-pty install: gyp info spawn args '--no-parallel', .../node_modules/node-pty install: gyp info spawn args '--generator-output', .../node_modules/node-pty install: gyp info spawn args 'C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules\.pnpm\node-pty@0.10.0\node_modules\node-pty\build', .../node_modules/node-pty install: gyp info spawn args '-Goutput_dir=.' .../node_modules/node-pty install: gyp info spawn args ] .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
.../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args [ .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args 'build/binding.sln', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '/clp:Verbosity=minimal', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '/nologo', .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args '/p:Configuration=Release;Platform=x64' .../spdlog@0.11.1/node_modules/spdlog install: gyp info spawn args ] .../spdlog@0.11.1/node_modules/spdlog install: 在此解决方案中一次生成一个项目。若要启用并行生成,请添加“-m”开关。 .../node_modules/node-pty install: gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe .../node_modules/node-pty install: gyp info spawn args [ .../node_modules/node-pty install: gyp info spawn args 'build/binding.sln', .../node_modules/node-pty install: gyp info spawn args '/clp:Verbosity=minimal', .../node_modules/node-pty install: gyp info spawn args '/nologo', .../node_modules/node-pty install: gyp info spawn args '/p:Configuration=Release;Platform=x64' .../node_modules/node-pty install: gyp info spawn args ] .../node_modules/node-pty install: 在此解决方案中一次生成一个项目。若要启用并行生成,请添加“-m”开关。 .../spdlog@0.11.1/node_modules/spdlog install: main.cc .../spdlog@0.11.1/node_modules/spdlog install: C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules.pnpm\nan@2.17.0\node_modules\nan\nan.h(59,10): fatal error C1083: 无法打开包括文件: “uv.h”: No such file or directory [C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules.pnpm\spdlog@0.11.1\node_modules\spdlog\build\spdlog.vcxproj] .../node_modules/node-pty install: conpty.cc .../spdlog@0.11.1/node_modules/spdlog install: gyp ERR! build error .../spdlog@0.11.1/node_modules/spdlog install: gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1 .../spdlog@0.11.1/node_modules/spdlog install: gyp ERR! stack at ChildProcess.onExit (C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\lib\build.js:203:23) .../spdlog@0.11.1/node_modules/spdlog install: gyp ERR! stack at ChildProcess.emit (node:events:513:28) .../spdlog@0.11.1/node_modules/spdlog install: gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12) .../spdlog@0.11.1/node_modules/spdlog install: gyp ERR! System Windows_NT 10.0.19045 .../spdlog@0.11.1/node_modules/spdlog install: gyp ERR! command "D:\node_js\node.exe" "C:\Users\zhengtao\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\bin\node-gyp.js" "rebuild" .../spdlog@0.11.1/node_modules/spdlog install: gyp ERR! cwd C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\app\node_modules.pnpm\spdlog@0.11.1\node_modules\spdlog .../spdlog@0.11.1/node_modules/spdlog install: gyp ERR! node -v v18.15.0 .../spdlog@0.11.1/node_modules/spdlog install: gyp ERR! node-gyp -v v9.3.1 .../spdlog@0.11.1/node_modules/spdlog install: gyp ERR! not ok .../spdlog@0.11.1/node_modules/spdlog install: Failed  ELIFECYCLE  Command failed with exit code 1.

at ChildProcess.<anonymous> (C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\builder-util\src\util.ts:250:14)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.cp.emit (C:\Users\zhengtao\Desktop\ide_js_ele\ide-electron-main\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1091:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

 ELIFECYCLE  Command failed with exit code 1.

yantze commented 1 year ago

没法复现,最好是把 node_modules 删除,重新安装一下依赖试试

zt6991 commented 1 year ago

之前删过,重新安装后,报错差不多

zt6991 commented 1 year ago

以下是使用了pnpm rebuild-native -- --force-rebuild=true时的报错

$ pnpm rebuild-native -- --force-rebuild=true

ide-electron@1.0.0 rebuild-native C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron node ./scripts/rebuild-native.js --target=electron "--" "--force-rebuild=true"

rebuilding native for electron version 18.3.4 rebuilding node-pty cache found for node-pty rebuilding @parcel/watcher node-gyp rebuild --openssl_fips=X --target=18.3.4 --arch=x64 --dist-url=https://electronjs.org/headers gyp info it worked if it ends with ok gyp info using node-gyp@9.1.0 gyp info using node@18.15.0 | win32 | x64 gyp info find Python using Python version 3.10.3 found at "C:\Users\zhengtao\AppData\Local\Programs\Python\Python310\python.exe" gyp info find VS using VS2019 (16.11.32228.343) found at: gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" gyp info find VS run with --verbose for detailed information gyp info spawn C:\Users\zhengtao\AppData\Local\Programs\Python\Python310\python.exe gyp info spawn args [ gyp info spawn args 'C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\.pnpm\node-gyp@9.1.0\node_modules\node-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 '-I', gyp info spawn args 'C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\@parcel\watcher\build\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\.pnpm\node-gyp@9.1.0\node_modules\node-gyp\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\zhengtao\AppData\Local\node-gyp\Cache\18.3.4\include\node\common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\Users\zhengtao\AppData\Local\node-gyp\Cache\18.3.4', gyp info spawn args '-Dnode_gyp_dir=C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\.pnpm\node-gyp@9.1.0\node_modules\node-gyp', gyp info spawn args '-Dnode_lib_file=C:\\Users\\zhengtao\\AppData\\Local\\node-gyp\\Cache\\18.3.4\\<(target_arch)\\node.lib', gyp info spawn args '-Dmodule_root_dir=C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\@parcel\watcher', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\@parcel\watcher\build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp: ........\node-addon-api@3.2.1\node_modules\node-addon-api\node_api.gyp not found (cwd: C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\@parcel\watcher) while loading dependencies of binding.gyp while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules.pnpm\node-gyp@9.1.0\node_modules\node-gyp\lib\configure.js:284:16) gyp ERR! stack at ChildProcess.emit (node:events:513:28) gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12) gyp ERR! System Windows_NT 10.0.19045 gyp ERR! command "D:\nodejs\node.exe" "C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--openssl_fips=X" "--target=18.3.4" "--arch=x64" "--dist-url=https://electronjs.org/headers" gyp ERR! cwd C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\@parcel\watcher gyp ERR! node -v v18.15.0 gyp ERR! node-gyp -v v9.1.0 gyp ERR! not ok node:child_process:960 throw err; ^

Error: Command failed: node-gyp rebuild --openssl_fips=X --target=18.3.4 --arch=x64 --dist-url=https://electronjs.org/headers gyp info it worked if it ends with ok gyp info using node-gyp@9.1.0 gyp info using node@18.15.0 | win32 | x64 gyp info find Python using Python version 3.10.3 found at "C:\Users\zhengtao\AppData\Local\Programs\Python\Python310\python.exe" gyp info find VS using VS2019 (16.11.32228.343) found at: gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" gyp info find VS run with --verbose for detailed information gyp info spawn C:\Users\zhengtao\AppData\Local\Programs\Python\Python310\python.exe gyp info spawn args [ gyp info spawn args 'C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\.pnpm\node-gyp@9.1.0\node_modules\node-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 '-I', gyp info spawn args 'C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\@parcel\watcher\build\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\.pnpm\node-gyp@9.1.0\node_modules\node-gyp\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\zhengtao\AppData\Local\node-gyp\Cache\18.3.4\include\node\common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\Users\zhengtao\AppData\Local\node-gyp\Cache\18.3.4', gyp info spawn args '-Dnode_gyp_dir=C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\.pnpm\node-gyp@9.1.0\node_modules\node-gyp', gyp info spawn args '-Dnode_lib_file=C:\\Users\\zhengtao\\AppData\\Local\\node-gyp\\Cache\\18.3.4\\<(target_arch)\\node.lib', gyp info spawn args '-Dmodule_root_dir=C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\@parcel\watcher', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\@parcel\watcher\build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp: ........\node-addon-api@3.2.1\node_modules\node-addon-api\node_api.gyp not found (cwd: C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\@parcel\watcher) while loading dependencies of binding.gyp while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules.pnpm\node-gyp@9.1.0\node_modules\node-gyp\lib\configure.js:284:16) gyp ERR! stack at ChildProcess.emit (node:events:513:28) gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12) gyp ERR! System Windows_NT 10.0.19045 gyp ERR! command "D:\nodejs\node.exe" "C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--openssl_fips=X" "--target=18.3.4" "--arch=x64" "--dist-url=https://electronjs.org/headers" gyp ERR! cwd C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\node_modules\@parcel\watcher gyp ERR! node -v v18.15.0 gyp ERR! node-gyp -v v9.1.0 gyp ERR! not ok

at checkExecSyncError (node:child_process:885:11)
at execSync (node:child_process:957:15)
at rebuildModule (C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\scripts\rebuild-native.js:83:5)
at C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\scripts\rebuild-native.js:104:3
at Array.forEach (<anonymous>)
at Object.<anonymous> (C:\Users\zhengtao\Desktop\new_opensumi\test1\ide-electron\scripts\rebuild-native.js:103:15)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32) {

status: 1, signal: null, output: [ null, Buffer(0) [Uint8Array] [], Buffer(3438) [Uint8Array] [ 103, 121, 112, 32, 105, 110, 102, 111, 32, 105, 116, 32, 119, 111, 114, 107, 101, 100, 32, 105, 102, 32, 105, 116, 32, 101, 110, 100, 115, 32, 119, 105, 116, 104, 32, 111, 107, 10, 103, 121, 112, 32, 105, 110, 102, 111, 32, 117, 115, 105, 110, 103, 32, 110, 111, 100, 101, 45, 103, 121, 112, 64, 57, 46, 49, 46, 48, 10, 103, 121, 112, 32, 105, 110, 102, 111, 32, 117, 115, 105, 110, 103, 32, 110, 111, 100, 101, 64, 49, 56, 46, 49, 53, 46, 48, 32, 124, 32, 119, 105, ... 3338 more items ] ], pid: 21568, stdout: Buffer(0) [Uint8Array] [], stderr: Buffer(3438) [Uint8Array] [ 103, 121, 112, 32, 105, 110, 102, 111, 32, 105, 116, 32, 119, 111, 114, 107, 101, 100, 32, 105, 102, 32, 105, 116, 32, 101, 110, 100, 115, 32, 119, 105, 116, 104, 32, 111, 107, 10, 103, 121, 112, 32, 105, 110, 102, 111, 32, 117, 115, 105, 110, 103, 32, 110, 111, 100, 101, 45, 103, 121, 112, 64, 57, 46, 49, 46, 48, 10, 103, 121, 112, 32, 105, 110, 102, 111, 32, 117, 115, 105, 110, 103, 32, 110, 111, 100, 101, 64, 49, 56, 46, 49, 53, 46, 48, 32, 124, 32, 119, 105, ... 3338 more items ] }

Node.js v18.15.0  ELIFECYCLE  Command failed with exit code 1.

yantze commented 1 year ago

@zt6991 尝试一下 删除 node_modules,然后使用 yarn 重新安装一下,看看是不是 pnpm 的方式不兼容 @parcel/watcher 模块