Skip to content

Error when importing AzPreview v14.0.0 module #27857

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
mikefrobbins opened this issue May 27, 2025 · 2 comments
Closed

Error when importing AzPreview v14.0.0 module #27857

mikefrobbins opened this issue May 27, 2025 · 2 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Possible-Solution Similar-Issue

Comments

@mikefrobbins
Copy link
Contributor

Description

The following errors are returned when importing the AzPreview module (Import-Module -Name AzPreview):

  • The specified module 'Az.Pinecone' with version '0.1.0' was not loaded because no valid module file was found in any module directory.
  • The specified module 'Az.WeightsAndBiases' with version '0.1.0' was not loaded because no valid module file was found in any module directory.

Issue script & Debug output

The AzPreview.psm1 file tries to import modules which were not installed because they're not available from the PowerShell Gallery:
- Import-Module Az.Pinecone -RequiredVersion 0.1.0 -Global
- Import-Module Az.WeightsAndBiases -RequiredVersion 0.1.0 -Global

Environment data

Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      5      1

Module versions

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     14.0.0                AzPreview                           Core,Desk

Error output

@mikefrobbins mikefrobbins added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels May 27, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label May 27, 2025
Copy link

Here are some similar issues that might help you. Please check if they can solve your problem.


Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

Solution 1:

The issue might be related to the differences in the Required Modules in the psd1 of each of these metamodules. To fix this, the publishing process for Az needs to populate that entry in the psd1 of the Az Module. I would also strongly advise that this is also populated in all the other sub modules that make up Az PowerShell too.

Reference:

Solution 2:

The issue only happens on Windows PowerShell but is not reproducible on PowerShell core. If possible, consider switching to the core version which supports cross-platforms.

Reference:

Powered by issue-sentinel

@mikefrobbins mikefrobbins changed the title Error when importing AzPreview module Error when importing AzPreview v14.0.0 module May 27, 2025
@dolauli
Copy link
Contributor

dolauli commented May 29, 2025

We have removed the two unlisted modules from azpreview. It will take effective in next release.

@dolauli dolauli closed this as completed May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Possible-Solution Similar-Issue
Projects
None yet
Development

No branches or pull requests

2 participants