Skip to content

Cannot find imported module of Powershell 7 polyglot action #998

@bcpmihail

Description

@bcpmihail

Description

Executing a PowerShell 7 polyglot action with an imported module results in an error of the type "The specified module '...' was not loaded because no valid module file was found in any module directory."
The error is most probably due to the folder structure of the generated ZIP file (module version subfolders not supported by BTVA).

Steps to Reproduce

  1. Create a polyglot project with a PowerSHell 7 polyglot action ("runtime": "powercli:13-powershell-7.4")
  2. Import a module in the action (e.g. Import-Module DnsClient-PS)
  3. Build with BTVA and push to an environment (mvn clean package vrealize:push -Penv)
  4. Run the action from orchestrator.

Preconditions: [What are the preconditions to reproduce the issue]

Expected behavior: [What you expect to happen]

The action completes as intended.

Actual behavior: [What actually happens]

An error of the type "The specified module '...' was not loaded because no valid module file was found in any module directory." is observable in the execution logs. As a result, any functions part of the imported module cannot be found.

Reproduces how often: [What percentage of the time does it reproduce]
Always

Component/s: [What are the Build Tools for VMware Aria components affected by the issue (e.g. "common/artifact-manager", "maven/plugins/vra-ng", "typescript/vrotest", etc)]
polyglot

Affects Build/s: [Which are the Build Tools for VMware Aria releases / builds affected by the issue]

Environment

Client

  • Build Tools for VMware Aria Version: 4.15.0
  • Visual Studio Code Version: 1.108.1
  • OS Version: Windows 11 Pro 24H2 build 26100.7462

Dependencies

Run: curl -o- https://raw.githubusercontent.com/vmware/build-tools-for-vmware-aria/main/health.sh | bash and paste the output here:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2881 100 2881 0 0 8692 0 --:--:-- --:--:-- --:--:-- 8730
Starting Build Tools for VMware Aria Checks...
✔ Node.js version 22.14.0 is within the required range (22 - 22).
✔ Maven version 3.9.9 meets the minimum requirement (>= 3.9).
✔ Java version 24.0.2 is within the required range (17 - 24).
All checks passed successfully.

Server

  • vRealize Automation Version:
  • vRealize Orchestrator Version:
  • vRealize Operations Version:
  • vRealize Log Insight Version:

Failure Logs

Related issues and PRs

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions