如何在没有管理员权限的情况下在我的机器上安装 windows-build-tools

问题描述

我尝试在 cmd 中运行以下命令(以管理员身份运行)npm install --global --production windows-build-tools,但收到此消息:

npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm 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.
npm WARN deprecated request@2.88.2: request has been deprecated,see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path C:\Users\KruminK\Programs\nodejs\node_modules\windows-build-tools
npm ERR! command Failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./dist/index.js
Downloading python-2.7.15.amd64.msi
npm ERR! [>                                            ] 0.0% (0 B/s)
npm ERR! Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\KruminK\.windows-build-tools\python-2.7.15.amd64.msi.
Downloading vs_BuildTools.exe
npm ERR! [>                                            ] 0.0% (0 B/s)
npm ERR! Downloaded vs_BuildTools.exe. Saved to C:\Users\KruminK\.windows-build-tools\vs_BuildTools.exe.
npm ERR!
npm ERR! Starting installation...
npm ERR! Please restart this script from an administrative PowerShell!
npm ERR! The build tools cannot be installed without administrative rights.
npm ERR! To fix,right-click on PowerShell and run "as Administrator".

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\KruminK\AppData\Local\npm-cache\_logs\2021-07-16T15_04_28_319Z-debug.log

我的工作计算机没有管理员权限,所以我想知道在没有管理员权限的情况下安装这些软件包的方法是什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)