npm install出现not looking for VS2013 as it is only supported up to Node.js 8

在Windows环境下执行npm install时遇到了错误,显示找不到Visual Studio 2015及更高版本。错误详细信息表明需要安装包含'Desktop development with C++'工作负载的最新Visual Studio。建议按照官方文档指示进行解决,可能需要运行带有'--loglevel silly'选项的命令以获取更多信息。

npm install时出现以下错误:

gyp verb find VS looking for Visual Studio 2015
gyp verb find VS - not found
gyp verb find VS not looking for VS2013 as it is only supported up to Node.js 8
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, try re-running with '--loglevel silly' for more details
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 (E:\project\DBApi-master\dbapi-ui\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at E:\project\DBApi-master\dbapi-ui\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (E:\project\DBApi-master\dbapi-ui\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at E:\project\DBApi-master\dbapi-ui\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at E:\project\DBApi-master\dbapi-ui\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at E:\project\DBApi-master\dbapi-ui\node_modules\node-gyp\lib\util.js:54:7    
gyp ERR! stack     at E:\project\DBApi-master\dbapi-ui\node_modules\node-gyp\lib\util.js:33:16   
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:390:5)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at maybeClose (internal/child_process.js:1058:16)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "D:\\nodejs\\node.exe" "E:\\project\\DBApi-master\\dbapi-ui\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
Build failed with error code: 1
tion not permitted, rmdir 'E:\project\DBApi-master\dbapi-ui\node_modules\sass-graph\node_modules'npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\watchpack-chokidar2\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@5.0.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@5.0.0 postinstall 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\WRD\AppData\Roaming\npm-cache\_logs\2021-10-20T07_12_58_295Z-debug.log   

根据提示在https://github.com/nodejs/node-gyp#on-windows
解决:

npm install -g node-gyp
npm install --global --production windows-build-tools
npm error gyp info it worked if it ends with ok npm error gyp info using node-gyp@11.4.2 npm error gyp info using node@24.10.0 | win32 | x64 npm error gyp info find Python using Python version 3.14.0 found at "D:\java\python\python.exe" npm error gyp http GET https://nodejs.org/download/release/v24.10.0/node-v24.10.0-headers.tar.gz npm error gyp http 200 https://nodejs.org/download/release/v24.10.0/node-v24.10.0-headers.tar.gz npm error gyp http GET https://nodejs.org/download/release/v24.10.0/SHASUMS256.txt npm error gyp http GET https://nodejs.org/download/release/v24.10.0/win-x64/node.lib npm error gyp http 200 https://nodejs.org/download/release/v24.10.0/SHASUMS256.txt npm error gyp http 200 https://nodejs.org/download/release/v24.10.0/win-x64/node.lib npm error gyp ERR! find VS npm error gyp ERR! find VS msvs_version not set from command line or npm config npm error gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt npm error gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details. npm error gyp ERR! find VS npm error gyp ERR! find VS Failure details: undefined npm error gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details. npm error gyp ERR! find VS npm error gyp ERR! find VS Failure details: undefined npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21 npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21 npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21 npm error gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18 npm error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 npm error gyp ERR! find VS npm error gyp ERR! find VS ************************************************************** npm error gyp E
最新发布
11-08
评论 7
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值