gpt4 book ai didi

node.js - 如何加载Visual C++组件 "VCBuild.exe"?

转载 作者:太空宇宙 更新时间:2023-11-03 21:54:53 25 4
gpt4 key购买 nike

我尝试运行“VCBuild.exe”

我的环境:

  • Windows 10 专业版 X64

  • Node v7.9.0-x64

  • Visual Studio 2017

所以,我只是像这个命令一样运行。

 $npm install --global --production windows-build-tools

但是这不起作用。错误如下:

> windows-build-tools@1.2.1 postinstall C:\Users\Josephine\AppData\Roaming\npm\n       ode_modules\windows-build-tools
> node ./lib/index.js

Downloading BuildTools_Full.exe
[> ] 0.0% (0 B/s)
Downloading python-2.7.11.msi
[> ] 0.0% (0 B/s)
Downloaded python-2.7.11.msi. Saved to C:\Users\Josephine\.windows-build-tools\p ython-2.7.11.msi.
Starting installation...
Please restart this script from an administrative PowerShell!
The build tools cannot be installed without administrative rights.
To fix, right-click on PowerShell and run "as Administrator".
npm WARN Error: EPERM: operation not permitted, scandir 'C:\Users\Josephine\AppD ata\Roaming\npm\node_modules\windows-build-tools\node_modules'
npm WARN { Error: EPERM: operation not permitted, scandir 'C:\Users\Josephine\A ppData\Roaming\npm\node_modules\windows-build-tools\node_modules'
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'scandir',
npm WARN path: 'C:\\Users\\Josephine\\AppData\\Roaming\\npm\\node_modules\\win dows-build-tools\\node_modules' }
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "install" "--global" "--production" "windows -build-tools"
npm ERR! node v7.9.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! windows-build-tools@1.2.1 postinstall: `node ./lib/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the windows-build-tools@1.2.1 postinstall script 'node ./lib/ index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the windows-build-tools p ackage,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./lib/index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs windows-build-tools
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls windows-build-tools
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Josephine\AppData\Roaming\npm-cache\_logs\2017-04-26T17_33 _28_317Z-debug.log

我该如何修复它们?

最佳答案

输出准确地说明了您需要执行的操作:

Please restart this script from an administrative PowerShell!
The build tools cannot be installed without administrative rights.
To fix, right-click on PowerShell and run "as Administrator".

如果您以管理员身份运行 PowerShell(或用于运行 npm 的命令提示符),那么它应该可以工作。

关于node.js - 如何加载Visual C++组件 "VCBuild.exe"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43641428/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com