Skip to content

'PowerShellEditorServices' was not loaded because no valid module file was found in any module directory. #812

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

Closed
aru-kun opened this issue Jun 1, 2017 · 7 comments
Labels
Needs: Fix Verification Please verify the fix for us!

Comments

@aru-kun
Copy link

aru-kun commented Jun 1, 2017

System Details

  • Operating system name and version: Ubuntu 17.04
  • VS Code version: 1.12.2-1494422229
  • PowerShell extension version: 1.2.0
  • Output from $PSVersionTable:
    Name Value
    PSVersion 6.0.0-alpha
    PSEdition Core
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 3.0.0.0
    GitCommitId v6.0.0-alpha.10
    CLRVersion
    WSManStackVersion 3.0
    PSRemotingProtocolVersion 2.3
    SerializationVersion 1.1.0.1
Copy / paste the below commands into the PowerShell Integrated Terminal, and paste the output here

**code -v**
1.12.2
19222cdc84ce72202478ba1cec5cb557b71163de
**$pseditor.EditorServicesVersion**
blank
**code --list-extensions --show-versions**
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
**$PSVersionTable**
Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.10
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

Hello,

I started getting this error whenever I start up VS Code with the PowerShell extension:

needs_install


An error occurred while starting PowerShell Editor Services:

The specified module 'PowerShellEditorServices' with version '1.2.0' was not loaded because no valid module file was found in any module directory.

Attached Logs

[18:46:49] Language server starting...
powershell.exe started --
    pid: 8581
    exe: /usr/bin/powershell
    args: /home/aru/.vscode/extensions/ms-vscode.powershell-1.2.0/scripts/Start-EditorServices.ps1 -EditorServicesVersion '1.2.0' -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.2.0' -BundledModulesPath '/home/aru/.vscode/extensions/ms-vscode.powershell-1.2.0/modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath '/home/aru/.vscode/extensions/ms-vscode.powershell-1.2.0/logs/1496278009-e7a5f234-96c0-4e05-a2ed-2ee680f8fe541496278008334/EditorServices.log' -SessionDetailsPath '/home/aru/.vscode/extensions/ms-vscode.powershell-1.2.0/sessions/PSES-VSCode-7984-653716' -FeatureFlags @()


[18:47:50] Language server startup failed.
Could not start language service: 
Timed out waiting for session file to appear.

powershell.exe terminated or terminal UI was closed
@daviwil
Copy link
Contributor

daviwil commented Jun 2, 2017

Hi @aru-kun, sorry for the delay! This issue is caused by using an out of date install of PowerShell Core. I'd recommend updating to the latest version, 6.0.0-beta.2. Let me know if that fixes the issue for you!

@daviwil daviwil added the Needs: Fix Verification Please verify the fix for us! label Jun 2, 2017
@aru-kun
Copy link
Author

aru-kun commented Jun 2, 2017

Problem fixed!
Thank you so much!

@aru-kun aru-kun closed this as completed Jun 2, 2017
@daviwil
Copy link
Contributor

daviwil commented Jun 2, 2017

No problem, thanks for confirming!

@tmongero
Copy link

tmongero commented Jun 21, 2017

@aru-kun This same thing is now happening for me, on version 6.0.0-beta.2 of the PowerShell Core extension for the Visual Studio Code app. Same error message that you (@aru-kun) provided, except the version of PowerShellEditorServices it's expecting is v1.3.2.

Operating System Name & Version: Mac OS Sierra 10.12.5

[20:36:28] Language server starting...
powershell.exe started --
    pid: 7218
    exe: /usr/local/bin/powershell
    args: /Users/thomasmongero/.vscode/extensions/ms-vscode.powershell-1.3.2/scripts/Start-EditorServices.ps1 -EditorServicesVersion '1.3.2' -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.3.2' -BundledModulesPath '/Users/thomasmongero/.vscode/extensions/ms-vscode.powershell-1.3.2/modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath '/Users/thomasmongero/.vscode/extensions/ms-vscode.powershell-1.3.2/logs/1498008988-e26bc9be-69f6-4f01-bec6-69bd6bea61161498008983833/EditorServices.log' -SessionDetailsPath '/Users/thomasmongero/.vscode/extensions/ms-vscode.powershell-1.3.2/sessions/PSES-VSCode-6981-264744' -FeatureFlags @()


[20:37:28] Language server startup failed.
Could not start language service: 
Timed out waiting for session file to appear.

code -v output:

1.13.1
379d2efb5539b09112c793d3d9a413017d736f89

code --list-extensions --show-versions output:
[email protected]

$PSVersionTable output:

Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.14
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

@daviwil
Copy link
Contributor

daviwil commented Jun 21, 2017

@tmongero Based on your $PSVersionTable output, you seem to be using v6.0.0-alpha.14 of PowerShell Core. Are you certain that you've installed v6.0.0-beta.2?

@tmongero
Copy link

tmongero commented Jun 21, 2017

Hey @daviwil -- was at the tail-end of the day yesterday, but I could have sworn I had the 6.0.0-beta.2 version installed. Anyhow, I upgraded to the latest version, rebooted my system, but the issue still persists. See new output of $PSVersionTable below:

Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
BuildVersion                   3.0.0.0
CLRVersion
GitCommitId                    v6.0.0-beta.2
OS                             Darwin 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

It also looks like the Powershell extensions for the Visual Studio Code app was updated today, to v1.4.0. Output of code --list-extensions --show-versions:
[email protected]

Thanks!

@PostImpatica
Copy link

PostImpatica commented Jul 26, 2017

@tmongero I had the same error you had on Mac 10.12. I followed this link and did like the article said, I removed the old powershell using the rm command then I ran the two commands that fix some sort of OpenSSL linking, then I installed the latest PowerShell Beta 4 package. I then updated the path in my VSCode settings to reflect the new version I just installed. Everything works now and my powershell extension in VSCode shows 1.4.1 btw, so I guess there's been an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Fix Verification Please verify the fix for us!
Projects
None yet
Development

No branches or pull requests

4 participants