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

win10依赖安装问题 #72

Open
zt6991 opened this issue Apr 18, 2023 · 3 comments
Open

win10依赖安装问题 #72

zt6991 opened this issue Apr 18, 2023 · 3 comments
Assignees

Comments

@zt6991
Copy link

zt6991 commented Apr 18, 2023

C:\ide_code\NEW\ide-electron>pnpm i
 WARN  deprecated request@2.88.2: request has been deprecated, see request/request#3142
 WARN  deprecated har-validator@5.1.5: this library is no longer supported
 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.
 WARN  deprecated @opensumi/vscode-ripgrep@1.4.0: Please use @opensumi/ripgrep instead
 WARN  deprecated electron-osx-sign@0.6.0: Please use @electron/osx-sign moving forward. Be aware the API is slightly different
 WARN  deprecated core-js@2.6.12: core-js@<3.23.3 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. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
 WARN  deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
Packages: +1049
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 1057, reused 1055, downloaded 0, added 0, done
node_modules/.pnpm/drivelist@6.4.6/node_modules/drivelist: Running install script...
node_modules/.pnpm/nsfw@2.2.0/node_modules/nsfw: Running install script, failed in 12.9s
.../.pnpm/nsfw@2.2.0/node_modules/nsfw install$ node-gyp rebuild
│ C:\ide_code\NEW\ide-electron\node_modules.pnpm\nsfw@2.2.0\node_modules\nsfw>if not defined npm_config_node_gyp (nod
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@9.3.1
│ gyp info using node@16.20.0 | win32 | x64
│ gyp info find Python using Python version 3.11.3 found at "C:\Users\zt\AppData\Local\Programs\Python\Python311\pytho
│ gyp info find VS using VS2019 (16.11.33529.622) found at:
│ gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
│ gyp info find VS run with --verbose for detailed information
│ gyp info spawn C:\Users\zt\AppData\Local\Programs\Python\Python311\python.exe
│ gyp info spawn args [
│ gyp info spawn args 'C:\Users\zt\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\gyp\
│ 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:\ide_code\NEW\ide-electron\node_modules\.pnpm\nsfw@2.2.0\node_modules\nsfw\build\
│ gyp info spawn args '-I',
│ gyp info spawn args 'C:\Users\zt\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\addon
│ gyp info spawn args '-I',
│ gyp info spawn args 'C:\Users\zt\AppData\Local\node-gyp\Cache\16.20.0\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\zt\AppData\Local\node-gyp\Cache\16.20.0',
│ gyp info spawn args '-Dnode_gyp_dir=C:\Users\zt\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\
│ gyp info spawn args '-Dnode_lib_file=C:\\Users\\zt\\AppData\\Local\\node-gyp\\Cache\\16.20.0\\<(ta
│ gyp info spawn args '-Dmodule_root_dir=C:\ide_code\NEW\ide-electron\node_modules\.pnpm\nsfw@2.2.0\node_modu
│ 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:\ide_code\NEW\ide-electron\node_modules\.pnpm\nsfw@2.2.0\node_modules\nsfw\build',
│ gyp info spawn args '-Goutput_dir=.'
│ gyp info spawn args ]
│ gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\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”开关。
│ NSFW.cpp
│ C:\ide_code\NEW\ide-electron\node_modules.pnpm\node-addon-api@4.3.0\node_modules\node-addon-api\napi.h(4,10): fatal
│ gyp ERR! build error
│ gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
│ gyp ERR! stack at ChildProcess.onExit (C:\Users\zt\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-
│ gyp ERR! stack at ChildProcess.emit (node:events:513:28)
│ gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
│ gyp ERR! System Windows_NT 10.0.19045
│ gyp ERR! command "C:\node16\node.exe" "C:\Users\zt\AppData\Roaming\npm\node_modules\pnpm\dist\node_module
│ gyp ERR! cwd C:\ide_code\NEW\ide-electron\node_modules.pnpm\nsfw@2.2.0\node_modules\nsfw
│ gyp ERR! node -v v16.20.0
│ gyp ERR! node-gyp -v v9.3.1
│ gyp ERR! not ok
└─ Failed in 12.9s at C:\ide_code\NEW\ide-electron\node_modules.pnpm\nsfw@2.2.0\node_modules\nsfw
node_modules/.pnpm/spdlog@0.9.0/node_modules/spdlog: Running install script...
 ELIFECYCLE  Command failed with exit code 1.

@yantze
Copy link
Member

yantze commented Apr 18, 2023

请删掉 node_modules 使用 yarn 重新安装一下。可能是 pnpm 导致 Windows 下 nsfw 编译异常。

@yantze yantze self-assigned this Apr 18, 2023
@zt6991
Copy link
Author

zt6991 commented Apr 19, 2023

你好这是删掉 node_modules 使用 yarn 重新安装后的日志
C:\ide_code\NEW\ide-electron>yarn
yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
warning @opensumi/ide-core-browser > react-ctxmenu-trigger > babel-runtime > core-js@2.6.12: core-js@<3.23.3 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. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
warning @opensumi/ide-debug > @opensumi/ide-file-service > trash > 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.
warning @opensumi/ide-debug > @opensumi/ide-file-service > @opensumi/ide-logs > spdlog@0.9.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
warning @opensumi/ide-debug > @opensumi/ide-file-service > trash > xdg-trashdir > @sindresorhus/df > execa > cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
warning @opensumi/ide-extension > @opensumi/ide-file-search > @opensumi/vscode-ripgrep@1.4.0: Please use @opensumi/ripgrep instead
warning Resolution field "requestretry@6.0.0" is incompatible with requested version "requestretry@^7.0.0"
warning @opensumi/ide-extension-manager > request@2.88.2: request has been deprecated, see request/request#3142
warning @opensumi/ide-extension-manager > request > 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.
warning @opensumi/ide-extension-manager > request > har-validator@5.1.5: this library is no longer supported
warning @opensumi/ide-search > @opensumi/vscode-ripgrep@1.4.0: Please use @opensumi/ripgrep instead
warning electron-builder > app-builder-lib > electron-osx-sign@0.6.0: Please use @electron/osx-sign moving forward. Be aware the API is slightly different
warning electron-builder > app-builder-lib > @electron/universal > asar@3.2.0: Please use @electron/asar moving forward. There is no API change, just a package name change
warning electron-rebuild@3.2.9: Please use @electron/rebuild moving forward. There is no API change, just a package name change
warning electron-rebuild > node-gyp > make-fetch-happen > cacache > @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
warning request@2.88.2: request has been deprecated, see request/request#3142
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@opensumi/ide-comments > react-mentions@3.3.2" has unmet peer dependency "react@16.x".
warning "@opensumi/ide-comments > react-mentions > substyle@6.3.1" has unmet peer dependency "react@>=15.3.2".
warning " > mobx-react-lite@1.5.2" has unmet peer dependency "react@^16.8.0".
warning "@opensumi/ide-debug > @opensumi/ide-terminal-next > node-pty@0.11.0-beta19" has incorrect peer dependency "node-gyp@^8.3.0".
warning " > react-dom@16.14.0" has unmet peer dependency "react@^16.14.0".
[4/4] Building fresh packages...
[8/10] ⠂ node-pty
[6/10] ⠄ drivelist
[10/10] ⠄ lzma-native
[4/10] ⠄ spdlog
error C:\ide_code\NEW\ide-electron\node_modules\nsfw: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\ide_code\NEW\ide-electron\node_modules\nsfw
Output:
C:\ide_code\NEW\ide-electron\node_modules\nsfw>if not defined npm_config_node_gyp (node "C:\node16\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.1.0
gyp info using node@16.20.0 | win32 | x64
gyp info find Python using Python version 3.11.3 found at "C:\Users\zt\AppData\Local\Programs\Python\Python311\python.exe"
gyp info find VS using VS2019 (16.11.33529.622) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Users\zt\AppData\Local\Programs\Python\Python311\python.exe
gyp info spawn args [
gyp info spawn args 'C:\node16\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:\ide_code\NEW\ide-electron\node_modules\nsfw\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\node16\node_modules\npm\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\zt\AppData\Local\node-gyp\Cache\16.20.0\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\zt\AppData\Local\node-gyp\Cache\16.20.0',
gyp info spawn args '-Dnode_gyp_dir=C:\node16\node_modules\npm\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\zt\\AppData\\Local\\node-gyp\\Cache\\16.20.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\ide_code\NEW\ide-electron\node_modules\nsfw',
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:\ide_code\NEW\ide-electron\node_modules\nsfw\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\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”开关。
NSFW.cpp
C:\ide_code\NEW\ide-electron\node_modules\nsfw\node_modules\node-addon-api\napi.h(4,10): fatal error C1083: 无法打开包括文件: “node_api.h”: No such file or directory [C:\ide_code\NEW\ide-electron\node_modules\nsfw\build\nsfw.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\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:\node16\node_modules\npm\node_modules\node-gyp\lib\build.js:201:23)
gyp ERR! stack at ChildProcess.emit (node:events:513:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\node16\node.exe" "C:\node16\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\ide_code\NEW\ide-electron\node_modules\nsfw

@yantze
Copy link
Member

yantze commented Apr 19, 2023

还是没法复现,你可以在本地环境自行运行 yarn add nsfw ,看看为什么 nsfw 不能安装。

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