首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >npm在windows上安装windows-build-tools

npm在windows上安装windows-build-tools
EN

Stack Overflow用户
提问于 2021-11-25 11:12:06
回答 1查看 151关注 0票数 0
代码语言:javascript
运行
复制
OS - Windows-10
node - v8.12.0
npm - 6.4.1

我使用的命令(以管理员身份运行):

代码语言:javascript
运行
复制
npm install --global --production --verbose windows-build-tools
代码语言:javascript
运行
复制
> windows-build-tools@5.2.2 postinstall C:\Users\winuser\AppData\Roaming\npm\node_modules\windows-build-tools
> node ./dist/index.js

Downloading vs_BuildTools.exe
[============================================>] 100.0% of 1.12 MB (1.12 MB/s)
Downloaded vs_BuildTools.exe. Saved to C:\Users\winuser\.windows-build-tools\vs_BuildTools.exe.

Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!

Status from the installers:
---------- Visual Studio Build Tools ----------
2021-11-23T15:34:08 : Verbose : [InstalledProductsProviderImpl]: Stream was closed
2021-11-23T15:34:08 : Verbose : [InstallerImpl]: Rpc connection was closed.
2021-11-23T15:34:08 : Verbose : [InstallerImpl]: Stream was closed
2021-11-23T15:34:09 : Verbose : Completed notifying all clients that the update is starting
2021-11-23T15:34:09 : Verbose : Updating installer [bootstrapperArguments: -- /finalizeInstall install --in C:\ProgramData\Microsoft\VisualStudio\Packages\_bootstrapper\vs_setup_bootstrapper_202111231533560643.json --norestart --quiet --includeRecommended --add Microsoft.VisualStudio.Workload.VCTools --locale en-US --activityId 61b330e5-53cf-4d1e-819c-b2acdd48ed03]
------------------- Python --------------------
Python 2.7.18 is already installed, not installing again.

它没有出来,我已经尝试安装了几次。在这两个时间里,它看起来都卡在了同一个点上。

尝试执行以下命令,它已安装,但显示Could not install Visual Studio Build Tools.

代码语言:javascript
运行
复制
npm install --global --production windows-build-tools@4.0.0
代码语言:javascript
运行
复制
Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!

Status from the installers:
---------- Visual Studio Build Tools ----------
Successfully installed Visual Studio Build Tools.
---------- Visual Studio Build Tools ----------
Successfully installed Visual Studio Build Tools.
------------------- Python --------------------
Python 2.7.18 is already installed, not installing again.

Could not install Visual Studio Build Tools.
Please find more details in the log files, which can be found at
C:\Users\winuser\.windows-build-tools

有人能帮我吗?

EN

回答 1

Stack Overflow用户

发布于 2021-11-27 09:51:40

您应该手动安装visual studio,并在安装过程中选择.NET和C/C++组件。我也有同样的问题,这对我来说是可行的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70110088

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档