Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when I import PowerShellGet 3.0.23: New-Alias: The alias is not allowed, because an alias with the name 'fimo' already exists #56

Open
3 tasks done
nbdinara opened this issue Nov 6, 2023 · 1 comment

Comments

@nbdinara
Copy link

nbdinara commented Nov 6, 2023

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

I am running command:
Import-Module PowerShellGet -MinimumVersion 3.0.23 -Scope Global -Force

I see errors:
New-Alias: The alias is not allowed, because an alias with the name 'fimo' already exists.
New-Alias: The alias is not allowed, because an alias with the name 'inmo' already exists.
New-Alias: The alias is not allowed, because an alias with the name 'pumo' already exists.
New-Alias: The alias is not allowed, because an alias with the name 'upmo' already exists.

It looks like that conflict is happening because the same aliases exist in 2.2.5 and 3.0.23 versions of PowerShellGet.
Should I not install PowerShellGet 3.0.23 until PowerShell 7.4 will be released?

Expected behavior

Module is loaded without errors

Actual behavior

New-Alias: The alias is not allowed, because an alias with the name 'fimo' already exists.
New-Alias: The alias is not allowed, because an alias with the name 'inmo' already exists.
New-Alias: The alias is not allowed, because an alias with the name 'pumo' already exists.
New-Alias: The alias is not allowed, because an alias with the name 'upmo' already exists.

But module at the end is loaded

Error details

My machine has PowerShellGet 2.2.5 installed. 
Then I install new module Microsoft.PowerShell.PSResourceGet
Then I install PowerShellGet 3.0.23 for compatibility between PowerShellGet v2 and PSResourceGet modules. 
When I load PowerShellGet 3.0.23 I see the errors.  

When I run:  
Get-Alias -Name 'fimo'

Output: 
CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           fimo -> Find-Module                                2.2.5      PowerShellGet

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.8
PSEdition                      Core
GitCommitId                    7.3.8
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

3.0.23-beta23

Visuals

No response

@Didjacome
Copy link

I have the same problem

image

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

No branches or pull requests

3 participants
@nbdinara @Didjacome and others