Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.

Could not install Visual Studio Build Tools. #243

Open
Apurva-Dhok opened this issue Apr 7, 2021 · 1 comment
Open

Could not install Visual Studio Build Tools. #243

Apurva-Dhok opened this issue Apr 7, 2021 · 1 comment

Comments

@Apurva-Dhok
Copy link

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Windows\system32> npm

Usage: npm

where is one of:
access, adduser, audit, bin, bugs, c, cache, ci, cit,
clean-install, clean-install-test, completion, config,
create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
edit, explore, fund, get, help, help-search, hook, i, init,
install, install-ci-test, install-test, it, link, list, ln,
login, logout, ls, org, outdated, owner, pack, ping, prefix,
profile, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, team, test, token, tst, un,
uninstall, unpublish, unstar, up, update, v, version, view,
whoami

npm -h quick help on
npm -l display full usage info
npm help search for help on
npm help npm involved overview

Specify configs in the ini-formatted file:
C:\Users\apurv.npmrc
or on the command line via: npm --key value
Config info can be viewed via: npm help config

npm@6.14.10 C:\Program Files\nodejs\node_modules\npm
PS C:\Windows\system32> npm install --global windows-build-tools
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

windows-build-tools@5.2.2 postinstall C:\Users\apurv\AppData\Roaming\npm\node_modules\windows-build-tools
node ./dist/index.js

Downloading python-2.7.15.amd64.msi
[============================================>] 100.0% of 20.25 MB (920.3 kB/s)
Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\apurv.windows-build-tools\python-2.7.15.amd64.msi.
Downloading vs_BuildTools.exe
[============================================>] 100.0% of 1.12 MB (1.12 MB/s)
Downloaded vs_BuildTools.exe. Saved to C:\Users\apurv.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 ----------
at SetupEngineAdapter.handleServiceHubError (C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\main\StubMain.js:4:377194)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
2021-04-07T15:32:44 : Error : A product matching the following parameters cannot be found: channelId: VisualStudio.15.Release productId: Microsoft.VisualStudio.Product.BuildTools
2021-04-07T15:32:44 : Verbose : Closing installer. Return code: 1.
------------------- Python --------------------
Successfully installed Python 2.7

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

Now configuring Python...

All done!

  • windows-build-tools@5.2.2
    added 147 packages from 102 contributors in 161.287s
    PS C:\Windows\system32>

what shall I do?

@karlhorky
Copy link

karlhorky commented Apr 22, 2021

Another option is to try installing the build tools via Chocolatey instead (use an Administrator command line):

choco install python visualstudio2017-workload-vctools -y
npm config set msvs_version 2017

Maybe this should be documented in the readme as an alternative...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants