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

Cannot add a member with the name "Order" because a member with that name already exists. #39

Open
ckuever opened this issue Oct 25, 2024 · 3 comments

Comments

@ckuever
Copy link

ckuever commented Oct 25, 2024

Hi,

i retrieve following error:

Add-Member: C:\Users\adm.Christian.Kuever\Downloads\logicappdocs-main\logicappdocs-main\src\Helper.ps1:225
Line |
225 | … Add-Member -MemberType NoteProperty -Name Order -Value $i …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot add a member with the name "Order" because a member with that name already exists. To overwrite the
| member anyway, add the Force parameter to your command.

 adding the -force did not solve it. 
@gooseleggs
Copy link

I have had this issue. For me it occurs because the if component does not have a runAfter key in it. So either add it to your file or wait a day or so and I will push a PR for the fix.

@ckuever
Copy link
Author

ckuever commented Nov 22, 2024

many thx, trying that and also happy waiting when you push a fix

@gooseleggs
Copy link

OK - delayed getting a pull request. It is hopefully quite simple. in helper.ps1

In line 40, change $runAfter from:

        else {
            Write-Warning ('Action {0} has no runafter property' -f $actionName)
            #Set runafter to parent if parent is not null
            if ($Parent) {
                $runAfter = $Parent
            }

to

        else {
            Write-Warning ('Action {0} has no runafter property' -f $actionName)
            #Set runafter to parent if parent is not null
            if ($Parent) {
                $runAfter = $Parent  -replace '(-False|-True)', ''
            }

Let me know if this fixes it for you

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

2 participants