InstallModuleFromGitHub
InstallModuleFromGitHub copied to clipboard
Invoke-RestMethod errors
Cmdlet:
Find-Module windows-screenfetch | Install-ModuleFromGitHub
Errors:
Invoke-RestMethod: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:47 Line | 47 | … Invoke-RestMethod $url -OutFile $OutFile -Headers $header … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | {"message":"Not Found","documentation_url":"https://developer.github.com/v3"} Unblock-File: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:49 Line | 49 | Unblock-File $OutFile | ~~~~~~~~~~~~~~~~~~~~~ | Cannot find path 'C:\Users\Yihua\AppData\Local\Temp\Windows-screenFetch.zip' because it does not exist. Get-FileHash: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:52 Line | 52 | $fileHash = $(Get-FileHash -Path $OutFile).hash | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot find path 'C:\Users\Yihua\AppData\Local\Temp\Windows-screenFetch.zip' because it does not exist. Expand-Archive: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:55 Line | 55 | … Expand-Archive -Path $OutFile -DestinationPath $tmpDir -F … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | The path 'C:\Users\Yihua\AppData\Local\Temp\Windows-screenFetch.zip' either does not exist or is not a | valid file system path.
Join-Path: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:73
Line |
73 | … hildItem (Join-Path -Path $tmpDir -ChildPath $unzippedArchive) -Inclu …
| ~~~~~~~~~~~~~~~~
| Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'ChildPath'.
| Specified method is not supported.
Join-Path: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:81
Line |
81 | … y-Item "$(Join-Path -Path $tmpDir -ChildPath $unzippedArchive)" $dest …
| ~~~~~~~~~~~~~~~~
| Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'ChildPath'.
| Specified method is not supported.
Copy-Item: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:81 Line | 81 | … = Copy-Item "$(Join-Path -Path $tmpDir -ChildPath $unzippedArchive)" … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot bind argument to parameter 'Path' because it is an empty string.
Cmdlet:
Install-ModuleFromGithub -GitHubRepo JulianChow94/Windows-screenFetch
Errors:
Invoke-RestMethod: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:47 Line | 47 | … Invoke-RestMethod $url -OutFile $OutFile -Headers $header … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Unable to read data from the transport connection: 远程主机强迫关闭了一个现有的连接。. Unblock-File: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:49 Line | 49 | Unblock-File $OutFile | ~~~~~~~~~~~~~~~~~~~~~ | Cannot find path 'C:\Users\Yihua\AppData\Local\Temp\Windows-screenFetch.zip' because it does not exist. Get-FileHash: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:52 Line | 52 | $fileHash = $(Get-FileHash -Path $OutFile).hash | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot find path 'C:\Users\Yihua\AppData\Local\Temp\Windows-screenFetch.zip' because it does not exist. Expand-Archive: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:55 Line | 55 | … Expand-Archive -Path $OutFile -DestinationPath $tmpDir -F … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | The path 'C:\Users\Yihua\AppData\Local\Temp\Windows-screenFetch.zip' either does not exist or is not a | valid file system path.
Join-Path: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:73
Line |
73 | … hildItem (Join-Path -Path $tmpDir -ChildPath $unzippedArchive) -Inclu …
| ~~~~~~~~~~~~~~~~
| Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'ChildPath'.
| Specified method is not supported.
Join-Path: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:81
Line |
81 | … y-Item "$(Join-Path -Path $tmpDir -ChildPath $unzippedArchive)" $dest …
| ~~~~~~~~~~~~~~~~
| Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'ChildPath'.
| Specified method is not supported.
Copy-Item: C:\Users\Yihua\Documents\PowerShell\Modules\InstallModuleFromGitHub\1.3.0\InstallModuleFromGitHub.psm1:81
Line |
81 | … = Copy-Item "$(Join-Path -Path $tmpDir -ChildPath $unzippedArchive)" …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot bind argument to parameter 'Path' because it is an empty string.
PowerShell version: 7.0.1