gogogo
管理员
管理员
  • UID25
  • 粉丝0
  • 关注0
  • 发帖数1384
阅读:7478回复:1

node-v14.16安装Install Additional Tools for Node.js

楼主#
更多 发布于:2021-11-23 10:04
如果用chocolatey官网的方法可以正常安装没有问题的话,估计不会看到我这个说明,但是我发这个教程的原因只是想给那些和我遇到同样问题的朋友,多一个可以解决的方法,也希望我的方法可以帮你解决和我遇到的同样的问题。



## 一、安装node
win10安装node-v14.16.0-x64.msi没有问题。
## 二、安装工具Install Additional Tools for Node.js
### 2.1、安装不了,提示错误
警告: An existing Chocolatey installation was detected. Installation will not continue.
For security reasons, this script will not overwrite existing installations.

Please use choco upgrade chocolatey to handle upgrades of Chocolatey itself.
![img](https://oscimg.oschina.net/oscnet/up-e5bfa37731cee05ac7f2a6a4d03ae7878bd.png)
### 2.2、解决方法
#### 2.2.1、删除是C:\ProgramData\chocolatey这个空文件夹
提示已安装,执行命令choco命令不存在。原因:原来有chocolatey文件夹,但是无内容。
#### 2.2.2、手动命令安装choco
注意以管理员的方式运行。
先执行:Set-ExecutionPolicy AllSigned
最后执行:Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
成功日志如下:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org)
Getting latest version of the Chocolatey package for download.
Not using proxy.
Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.15.
Downloading https://chocolatey.org/api/v2/package/chocolatey/0.10.15 to C:\Users\Lenovo\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip
Not using proxy.
Extracting C:\Users\Lenovo\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip to C:\Users\Lenovo\AppData\Local\Temp\chocolatey\chocoInstall
Installing Chocolatey on the local machine
Creating ChocolateyInstall as an environment variable (targeting 'Machine')
 Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell
 before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to 'C:\ProgramData\chocolatey\lib'
 (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
 and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.

Creating Chocolatey folders if they do not already exist.
WARNING: You can safely ignore errors related to missing log files when
 upgrading from a version of Chocolatey less than 0.9.9.
 'Batch file could not be found' is also safe to ignore.
 'The system cannot find the file specified' - also safe.
chocolatey.nupkg file not installed in lib.
 Attempting to locate it from bootstrapper.
PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding...
警告: Not setting tab completion: Profile file does not exist at
'C:\Users\Lenovo\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
 first prior to using choco.
Ensuring Chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder

#### 2.2.3、再次执行Install Additional Tools for Node.js
![img](https://oscimg.oschina.net/oscnet/up-694c9fd61460c4b63234cdd7eaaed5f7599.png)
安装成功日志如下:
警告: An existing Chocolatey installation was detected. Installation will not continue.
For security reasons, this script will not overwrite existing installations.

Please use choco upgrade chocolatey to handle upgrades of Chocolatey itself.
Chocolatey v0.10.15
Upgrading the following packages:
python;visualstudio2017-workload-vctools
By upgrading you accept licenses for the packages.
python v3.9.2 is the latest version available based on your source(s).
visualstudio2017-workload-vctools is not installed. Installing...
Progress: Downloading visualstudio2017-workload-vctools 1.3.3... 100%
Progress: Downloading visualstudio2017-workload-vctools 1.3.3... 100%
Progress: Downloading visualstudio-installer 2.0.1... 100%
Progress: Downloading visualstudio-installer 2.0.1... 100%
Progress: Downloading visualstudio2017buildtools 15.9.34.0... 100%
Progress: Downloading visualstudio2017buildtools 15.9.34.0... 100%
Progress: Downloading dotnetfx 4.8.0.20190930... 100%
Progress: Downloading dotnetfx 4.8.0.20190930... 100%
Progress: Downloading chocolatey-dotnetfx.extension 1.0.1... 100%
Progress: Downloading chocolatey-dotnetfx.extension 1.0.1... 100%

chocolatey-visualstudio.extension v1.9.0 [Approved]
chocolatey-visualstudio.extension package files upgrade completed. Performing other installation steps.
 Installed/updated chocolatey-visualstudio extensions.
 The upgrade of chocolatey-visualstudio.extension was successful.
 Software installed to 'C:\ProgramData\chocolatey\extensions\chocolatey-visualstudio'

visualstudio-installer v2.0.1 [Approved]
visualstudio-installer package files upgrade completed. Performing other installation steps.
 The upgrade of visualstudio-installer was successful.
 Software install location not explicitly set, could be in package or
 default install location if installer.

chocolatey-dotnetfx.extension v1.0.1 [Approved]
chocolatey-dotnetfx.extension package files upgrade completed. Performing other installation steps.
 Installed/updated chocolatey-dotnetfx extensions.
 The upgrade of chocolatey-dotnetfx.extension was successful.
 Software installed to 'C:\ProgramData\chocolatey\extensions\chocolatey-dotnetfx'

dotnetfx v4.8.0.20190930 [Approved]
dotnetfx package files upgrade completed. Performing other installation steps.
Microsoft .NET Framework 4.8 or later is already installed.
 The upgrade of dotnetfx was successful.
 Software install location not explicitly set, could be in package or
 default install location if installer.

visualstudio2017buildtools v15.9.34.0 [Approved]
visualstudio2017buildtools package files upgrade completed. Performing other installation steps.
Downloading channel manifest
 from 'https://aka.ms/vs/15/release/channel'
Progress: 100% - Completed download of C:\Users\Lenovo\AppData\Local\Temp\chocolatey\chocolatey-visualstudio.extension\ChannelManifest_81725945.man (69.46 KB).
Download of ChannelManifest_81725945.man (69.46 KB) completed.
Downloading catalog manifest
 from 'https://download.visualstudio.microsoft.com/download/pr/62b68847-6218-46c3-bee7-a293d3615b3f/03501f3aa18920190ba117dafbc654d052118b42863e5920ae94d84a6b6738db/VisualStudio.vsman'
Progress: 100% - Completed download of C:\Users\Lenovo\AppData\Local\Temp\chocolatey\chocolatey-visualstudio.extension\Catalog_1044069892.man (7.94 MB).
Download of Catalog_1044069892.man (7.94 MB) completed.
Downloading visualstudio2017buildtools
 from 'https://download.visualstudio.microsoft.com/download/pr/62b68847-6218-46c3-bee7-a293d3615b3f/f9df8470d9e57e9e822909dc7fc28c83f159a31023b205360778b941fb0cc884/vs_BuildTools.exe'
Progress: 100% - Completed download of C:\Users\Lenovo\AppData\Local\Temp\chocolatey\visualstudio2017buildtools\15.9.34.0\vs_BuildTools.exe (1.2 MB).
Download of vs_BuildTools.exe (1.2 MB) completed.
Hashes match.
Installing visualstudio2017buildtools...

Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\1028\help.html...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\2052\help.html...

Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\1031\help.html...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\1042\help.html...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\1036\help.html...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\3082\help.html...

Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\1029\help.html...

Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\1045\help.html...

Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\1041\help.html...

Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\1040\help.html...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\1055\help.html...

Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\1046\help.html...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\1049\help.html...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\HelpFile\1033\help.html...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\vs_setup_bootstrapper.exe...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\Microsoft.Diagnostics.Tracing.EventSource.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\Microsoft.VisualStudio.RemoteControl.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.Common.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.Configuration.Interop.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.Download.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.Engine.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\Microsoft.VisualStudio.Telemetry.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\Microsoft.VisualStudio.Utilities.Internal.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\Newtonsoft.Json.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\zh-Hans\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\zh-Hant\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\cs\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\es\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\pt-BR\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\tr\vs_setup_bootstrapper.resources.dll...


Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\de\vs_setup_bootstrapper.resources.dll...


Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\fr\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\it\vs_setup_bootstrapper.resources.dll...

Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\pl\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\ko\vs_setup_bootstrapper.resources.dll...

Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\ja\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\ru\vs_setup_bootstrapper.resources.dll...


Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\vs_setup_bootstrapper.exe.config...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\vs_setup_bootstrapper.config...

Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\detection.json...
Preparing: C:\Users\Lenovo\AppData\Local\Temp\chocolatey\1b08389a0ebe65b740795ff7\vs_bootstrapper_d15\vs_setup_bootstrapper.json...
visualstudio2017buildtools has been installed.
 visualstudio2017buildtools may be able to be automatically uninstalled.
 The upgrade of visualstudio2017buildtools was successful.
 Software installed to '"C:\Program Files (x86)\Microsoft Visual Studio\Installer"'

visualstudio2017-workload-vctools v1.3.3 [Approved]
visualstudio2017-workload-vctools package files upgrade completed. Performing other installation steps.
Installing visualstudio2017-workload-vctools...

visualstudio2017-workload-vctools has been installed.
 visualstudio2017-workload-vctools may be able to be automatically uninstalled.
Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
 The upgrade of visualstudio2017-workload-vctools was successful.
 Software install location not explicitly set, could be in package or
 default install location if installer.

Chocolatey upgraded 6/7 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Upgraded:
 \- visualstudio2017buildtools v15.9.34.0
 \- dotnetfx v4.8.0.20190930
 \- chocolatey-visualstudio.extension v1.9.0
 \- visualstudio2017-workload-vctools v1.3.3
 \- visualstudio-installer v2.0.1
 \- chocolatey-dotnetfx.extension v1.0.1

### 三、此文结束。


gogogo
管理员
管理员
  • UID25
  • 粉丝0
  • 关注0
  • 发帖数1384
沙发#
发布于:2021-11-23 10:04
游客


返回顶部