Windows 10中vscode中的node.js安装错误 [英] node.js installation error in windows 10 in vscode
问题描述
Exception calling "DownloadString" with "1" argument(s): "The request was aborted: Could not create SSL/TLS secure
channel."
At line:1 char:1
+ iex ((New-Object System.Net.WebClient).DownloadString('https://chocol ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:95
+ ... .DownloadString('https://chocolatey.org/install.ps1')); choco upgrade ...
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (choco:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException*
推荐答案
Pauby帖子中给出的启用TLS 1.2的Powershell命令是正确的,但是存在问题.问题是仅针对该会话启用了TLS 1.2.要检查此关闭的Powershell,然后再次打开Powershell.现在检查TLS1.2状态.尽管将其设置为true,它仍将显示"False".要将TLS 1.2设置为默认值或进行进一步的会话,请在Powershell中运行以下命令.(这些脚本摘自 https://johnlouros.com/blog/enabling-strong-cryptography-for-all-dot-net-applications )
The Powershell commands to enable TLS 1.2 given in Pauby's post are correct but there is an issue. The issue is TLS 1.2 gets enabled only for that session. To check this close powershell and open powershell again. Now check the TLS1.2 status. It will show 'False' though you set it to true. To make TLS 1.2 as default or for further sessions run the following in the Powershell.( These scripts are taken from https://johnlouros.com/blog/enabling-strong-cryptography-for-all-dot-net-applications )
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
这对我有用.
这篇关于Windows 10中vscode中的node.js安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!