Skip to content

VScode error: Could not find the module 'PSKoans'. commands typed in console window work fine. #468

@doctrosix

Description

@doctrosix

Describe "Koan Bug, Issue, or Help Request"

All Koans.ps1 opened in VS code

Visual Studio Code
Version 1.64.0

Module versions installed:

Version              Name                                Repository           Description
-------              ----                                ----------           -----------
5.3.1                Pester                              PSGallery            Pester provides a framework for runnin...
0.67.1               PSKoans                             PSGallery            A module designed to provide a crash-c...

Context "The Problematic Assertions"

In every koan that VScode opens, it reports a problem with Line 1:
using module PSKoans

In problems tab:
❌Could not find the module 'PSKoans'.

In a powershell 5.1 console window, commands like Show-Karma work just fine.

Context "Your Attempts"

I deleted the Pester and PSKoans folders from $env:HOMEPATH\Documents\WindowsPowerShell\Modules
I reinstalled PSKoans, and Pester with these commands, in an administrator window:

$names = "Pester", "PSKoans"
foreach( $name in $names){
    Install-Module -Name $name -Force -Scope AllUsers -AllowClobber
}

Context "Additional Information"

It may be possible I've installed it incorrectly, but I do not know how to debug it further.
I'm happy to provide you with any additional info you need.

The PSKoans have been wonderful in teaching me the finer details of powershell, over and above the everyday commands I use at work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions