After migrating to preview Pode.Web 1.0.0: 'Get-PodeWebState' is not recognized
After migrating to preview Pode.Web 1.0.0: 'Get-PodeWebState' is not recognized
'Get-PodeWebState' is not included in module commands.
'Get-PodeWebState' is present in many ps1.
Thanks!
Hi @NicolasTNS,
I think I might have worked out why this happens, as I also just triggered the same error. It will require a fix in core Pode though.
To see if the cause is the same, do you happen to use Export-PodeModule or ConvertTo-PodeWebPage at all?
Hi,
I get the same message. I am not usingExport-PodeModuleor ConvertTo-PodeWebPage.
Pode.Web 1.0.0 preview2 Pode 2.10.1
Hello, same issue here. It worked okay on Pode 2.11.0, then I updated to 2.11.1 and it broke, so I reverted to 2.11.0 and it's still not working, so I'm at a bit of a loss. Routes work fine, the pages just produce that sam Get-PodeWebState command not found.
Hi @NicolasTNS, @datenschieber, @diflartle,
I've just reproduced this myself, and it's caused by having AutoImport disabled in your server.psd1 file:
@{
Server = @{
AutoImport = @{
Modules = @{
Enable = $false
}
}
}
}
You can either set Enable = $true or remove the AutoImport section, or if you need is "disabled" then setting it to true but also setting ExportOnly to true wil mimic it being disabled, but will allow Pode.Web to load:
@{
Server = @{
AutoImport = @{
Modules = @{
Enable = $true
ExportOnly = $true
}
}
}
}
This has worked for myself, and people on Discord, so let me know if it does/doesn't work for yourselves. I can look to update the migration guide to reference this configuration.