could not use PowerShell to find Visual Studio 2017 or newer,

新电脑运行Node.js项目出现错误,可能是缺少VisualStudio。建议访问微软官网下载并安装VisualStudio,根据需求选择组件,特别是Node.js和Python的开发工具,以确保项目正常运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

新换的电脑运行nodejs项目,报错
可能但不一定是电脑没有安装visual studio,直接去微软官网下载visual studio安装即可,按需安装,建议将nodejs python都装上

PS E:\tool\my-desktop-app> npm install electron robotjs npm warn deprecated npmlog@4.1.2: This package is no longer supported. npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported. npm warn deprecated boolean@3.2.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm warn deprecated gauge@2.7.4: This package is no longer supported. npm warn cleanup Failed to remove some directories [ npm warn cleanup [ npm warn cleanup 'E:\\tool\\my-desktop-app\\node_modules', npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'E:\tool\my-desktop-app\node_modules\bl\node_modules\readable-stream'] { npm warn cleanup errno: -4048, npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'E:\\tool\\my-desktop-app\\node_modules\\bl\\node_modules\\readable-stream' npm warn cleanup } npm warn cleanup ] npm warn cleanup ] npm error code 1 npm error path E:\tool\my-desktop-app\node_modules\robotjs npm error command failed npm error command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install || node-gyp rebuild npm error gyp info it worked if it ends with ok npm error gyp info using node-gyp@10.1.0 npm error gyp info using node@18.20.7 | win32 | x64 npm error gyp info find Python using Python version 3.10.0 found at "C:\Users\lijian\AppData\Local\Programs\Python\Python310\python.exe" 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.
03-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值