Skip to content

Show-Karma failed on relatively fresh installation #452

Closed

Description

@vkuehn

Describe "Koan Bug, Issue, or Help Request"

Following the instaructions on the Readme.md ends up in a dead end on a clean installation

Context "The Problematic Assertions"

Show-Karma

Context "Your Attempts"

there a missing Modules in the instructions for new comers thought

Context "Additional Information"

Did try in PS 5.1 and 7.1.3 in these steps on a newly machines

  1. git clone https://github.com/vexx32/PSKoans.git
  2. PS 5.1 (upgrade to latest Pester)

Install-Module Pester -Force -SkipPublisherCheck -Scope CurrentUser -MinimumVersion 5.0.2

PS 6.0+ (Install Pester under current user)

Install-Module Pester -Scope CurrentUser -MinimumVersion 5.0.2
3. Get-ExecutionPolicy => Bypass
4. $env:PSModulePath = "$(Get-Location)$([IO.Path]::PathSeparator)${env:PSModulePath}"
5. Show-Karma

Ends in
Show-Karma: The 'Show-Karma' command was found in the module 'PSKoans', but the module could not be loaded. For more information, run 'Import-Module PSKoans'.

Import-Module PSKoans ends in
Import-Module: The member 'FormatsToProcess' in the module manifest is not valid: Cannot find path
...PSKoans.format.ps1xml' because it does not exist..

Install-Module EZOut ends up in conlict messages

Activity

  1. added
    Category-Koans
    Issue-Discussion
    on Aug 2, 2021
  2. vexx32 commented on Aug 2, 2021

    @vexx32
    Collaborator

    Did you install from the PSGallery or clone the repository? If the latter, you need to install EZOut (using -AllowClobber, if memory serves, you might need it for the install and the import commands) and then run the PSKoans.ezformat.ps1 script to generate the format file before placing the module folder in a module path for use.

    I might need to add some instructions around that to the readme, I'm not sure if I ended up documenting that properly.

  3. added
    Category-Module
    and removed
    Category-Koans
    on Aug 2, 2021
  4. vkuehn commented on Aug 2, 2021

    @vkuehn
    Author

    I did clone the repo. After following your instructions here I get
    Show-Karma: You cannot call a method on a null-valued expression.

  5. vexx32 commented on Aug 2, 2021

    @vexx32
    Collaborator

    Check $Error[0].Exception.GetBaseException() | Format-List -Force for the details of that I suppose, not much to go on there.

  6. vkuehn commented on Aug 2, 2021

    @vkuehn
    Author

    ErrorRecord : You cannot call a method on a null-valued expression.
    WasThrownFromThrowStatement : False
    TargetSite : Void CheckActionPreference(System.Management.Automation.Language.FunctionContext,
    System.Exception)
    StackTrace : at
    System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext
    funcContext, Exception exception)
    at
    System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Interp retedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Interp retedFrame frame) at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) at System.Management.Automation.PSScriptCmdlet.RunClause(Action1 clause, Object
    dollarUnderbar, Object inputToProcess)
    at System.Management.Automation.CommandProcessorBase.Complete()
    Message : You cannot call a method on a null-valued expression.
    Data : {System.Management.Automation.Interpreter.InterpretedFrameInfo}
    InnerException :
    HelpLink :
    Source : System.Management.Automation
    HResult : -2146233087

  7. vexx32 commented on Aug 2, 2021

    @vexx32
    Collaborator

    That's definitely an odd one, don't think I've seen that before. Is it the same in 5.1 as well as 7.x versions of powershell for you?

    Also, might be worth trying to reinstall just from the gallery with Install-Module PSKoans and seeing if that works out better for you for whatever reason.

  8. vkuehn commented on Aug 2, 2021

    @vkuehn
    Author

    It complained
    WARNING: Version '0.67.0' of module 'PSKoans' is already installed at...
    To install version '0.67.1', run Install-Module and add the -Force parameter,
    did so.
    Show-Karma in that git folder shows me
    Show-Karma: You cannot call a method on a null-valued expression

    are you sure you have pushed the latest Stuff ?
    I'll close it now as I don't think we go here anywhere but will watch the repo and try the next mayor release.
    looks promissing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Category-ModuleIssue-Discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions