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 [email protected]: request has been deprecated, see request/request#3142
 WARN  deprecated [email protected]: this library is no longer supported
 WARN  deprecated [email protected]: 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/[email protected]: Please use @opensumi/ripgrep instead
 WARN  deprecated [email protected]: Please use @electron/osx-sign moving forward. Be aware the API is slightly different
 WARN  deprecated [email protected]: 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 [email protected]: 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/[email protected]/node_modules/drivelist: Running install script...
node_modules/.pnpm/[email protected]/node_modules/nsfw: Running install script, failed in 12.9s
.../.pnpm/[email protected]/node_modules/nsfw install$ node-gyp rebuild
│ C:\ide_code\NEW\ide-electron\node_modules.pnpm\[email protected]\node_modules\nsfw>if not defined npm_config_node_gyp (nod
│ gyp info it worked if it ends with ok
│ gyp info using [email protected]
│ gyp info using [email protected] | 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\[email protected]\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\[email protected]\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\[email protected]\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\[email protected]\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\[email protected]\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\[email protected]\node_modules\nsfw
node_modules/.pnpm/[email protected]/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 > [email protected]: 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 > [email protected]: 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 > [email protected]: 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 > [email protected]: cross-spawn no longer requires a build toolchain, use it instead
warning @opensumi/ide-extension > @opensumi/ide-file-search > @opensumi/[email protected]: Please use @opensumi/ripgrep instead
warning Resolution field "[email protected]" is incompatible with requested version "requestretry@^7.0.0"
warning @opensumi/ide-extension-manager > [email protected]: request has been deprecated, see request/request#3142
warning @opensumi/ide-extension-manager > request > [email protected]: 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 > [email protected]: this library is no longer supported
warning @opensumi/ide-search > @opensumi/[email protected]: Please use @opensumi/ripgrep instead
warning electron-builder > app-builder-lib > [email protected]: Please use @electron/osx-sign moving forward. Be aware the API is slightly different
warning electron-builder > app-builder-lib > @electron/universal > [email protected]: Please use @electron/asar moving forward. There is no API change, just a package name change
warning [email protected]: 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/[email protected]: This functionality has been moved to @npmcli/fs
warning [email protected]: request has been deprecated, see request/request#3142
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@opensumi/ide-comments > [email protected]" has unmet peer dependency "[email protected]".
warning "@opensumi/ide-comments > react-mentions > [email protected]" has unmet peer dependency "react@>=15.3.2".
warning " > [email protected]" has unmet peer dependency "react@^16.8.0".
warning "@opensumi/ide-debug > @opensumi/ide-terminal-next > [email protected]" has incorrect peer dependency "node-gyp@^8.3.0".
warning " > [email protected]" 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 [email protected]
gyp info using [email protected] | 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