pnpm 安装时无法安装 Fibers

pnpm 安装时无法安装 Fibers

我尝试删除 node_modules 并运行pnpm store prune,同时安装了带有“使用 C++ 进行桌面开发”工作负载的 Visual Studio。

这也发生在 上npm installpnpm install fibers我收到以下错误:

Progress: resolved 3093, reused 0, downloaded 3077, added 3093, done
node_modules/.pnpm/[email protected]/node_modules/core-js-pure: Running postinstall script, done in 206ms
node_modules/.pnpm/[email protected]/node_modules/core-js: Running postinstall script, done in 295ms
node_modules/.pnpm/@[email protected]/node_modules/@datadog/native-appsec: Running install script, done in 425node_modules/.pnpm/[email protected]/node_modules/fibers: Running install script, failed in 2.1s
.../[email protected]/node_modules/fibers install$ node build.js || nodejs build.js
│ C:\Users\Rodrigo\Development\next.js\node_modules\.pnpm\[email protected]\node_modules\fibers>if not defined npm_config_n
│ 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.2 found at "C:\Python311\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 checking VS2022 (17.5.33516.290) found at:
│ gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
│ gyp ERR! find VS - found "Visual Studio C++ core features"
│ gyp ERR! find VS - found VC++ toolset: v143
│ gyp ERR! find VS - missing any Windows SDK
│ gyp ERR! find VS checking VS2019 (16.11.33423.256) found at:
│ gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
│ gyp ERR! find VS - found "Visual Studio C++ core features"
│ gyp ERR! find VS - missing any VC++ toolset
│ 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 **************************************************************
│ 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:\Users\Rodrigo\AppData\Local\node\corepack\pnpm\7.24.3\dist\node_mo
│ gyp ERR! stack     at C:\Users\Rodrigo\AppData\Local\node\corepack\pnpm\7.24.3\dist\node_modules\node-gyp\lib\find-v
│ gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\Rodrigo\AppData\Local\node\corepack\pnpm\7.2
│ gyp ERR! stack     at C:\Users\Rodrigo\AppData\Local\node\corepack\pnpm\7.24.3\dist\node_modules\node-gyp\lib\find-v
│ gyp ERR! stack     at C:\Users\Rodrigo\AppData\Local\node\corepack\pnpm\7.24.3\dist\node_modules\node-gyp\lib\find-v
│ gyp ERR! stack     at C:\Users\Rodrigo\AppData\Local\node\corepack\pnpm\7.24.3\dist\node_modules\node-gyp\lib\util.j
│ gyp ERR! stack     at C:\Users\Rodrigo\AppData\Local\node\corepack\pnpm\7.24.3\dist\node_modules\node-gyp\lib\util.j
│ gyp ERR! stack     at ChildProcess.exithandler (node:child_process:427:5)
│ gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
│ gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
│ gyp ERR! System Windows_NT 10.0.19045
│ gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Rodrigo\\AppData\\Local\\node\\corepack\\pnpm\\7.
│ gyp ERR! cwd C:\Users\Rodrigo\Development\next.js\node_modules\.pnpm\[email protected]\node_modules\fibers
│ gyp ERR! node -v v18.15.0
│ gyp ERR! node-gyp -v v9.3.1
│ gyp ERR! not ok
│ node-gyp exited with code: 1
│ Please make sure you are using a supported platform and node version. If you
│ would like to compile fibers on this machine please make sure you have setup your
│ build environment--
│ Windows + OS X instructions here: https://github.com/nodejs/node-gyp
│ Ubuntu users please run: `sudo apt-get install g++ build-essential`
│ RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`
│ Alpine users please run: `sudo apk add python make g++`
│ 'nodejs' is not recognized as an internal or external command,
│ operable program or batch file.
└─ Failed in 2.1s at C:\Users\Rodrigo\Development\next.js\node_modules\.pnpm\[email protected]\node_modules\fibers
node_modules/.pnpm/[email protected]/node_modules/playwright-chromium: Running install script...
node_modules/.pnpm/[email protected]/node_modules/protobufjs: Running postinstall script, done in 206ms
 ELIFECYCLE  Command failed with exit code 1.

相关内容