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

nxtools installation fails on Import-Module with "Method 'get_Exists' in type 'nxFileSystemInfo' does not have an implementation" error. #55

Open
mindcrime opened this issue Jul 7, 2024 · 1 comment

Comments

@mindcrime
Copy link

Details of the scenario you tried and the problem that is occurring

I am trying to install nxtools on Powershell on Linux. The Install-Module step succeeds, but when trying to do Import-Module an error occurs, as follows:

ParserError: Error during creation of type "nxFileSystemInfo". Error message: Method 'get_Exists' in type 'nxFileSystemInfo' from assembly 'PowerShell Class
Assembly, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null' does not have an implementation.

Verbose logs showing the problem

prhodes@troubadour:~$ pwsh
PowerShell 7.4.3
PS /home/prhodes> Install-Module 'nxtools'

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the
Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
PS /home/prhodes> Import-Module nxtools
ParserError: Error during creation of type "nxFileSystemInfo". Error message: Method 'get_Exists' in type 'nxFileSystemInfo' from assembly 'PowerShell Class
Assembly, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null' does not have an implementation.
Import-Module: The module to process 'nxtools.psm1', listed in field 'ModuleToProcess/RootModule' of module manifest '/home/prhodes/.local/share/powershell/Modules/nxtools/1.4.0/nxtools.psd1' was not processed because no valid module was found in any module directory.

Suggested solution to the issue

I have no idea.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

# insert configuration here

The operating system the target node is running

prhodes@troubadour:~$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

Version and build of PowerShell the target node is running

prhodes@troubadour:~$ pwsh --version
PowerShell 7.4.3

Version of the DSC module that was used

Name Version Path


nxtools 1.4.0 /home/prhodes/.local/share/powershell/Modules/nxtools/1.4.0/nxtools.psd1

Additional Notes:

This error happens whether I use the package from Powershell Gallery, or I build from source and install my own build.

@Carvalho1990
Copy link

Same issue with our enviroment.

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