question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import nx package module using AutomationClient.Modules.CreateOrUpdate

See original GitHub issue

Hi everyone,

I’ve been trying to import nx package using the AutomationClient namespace but it does not work, the status of this module keeps hanging on “Importing”. I found that it works fine with the modules which are created by author azure-sdk.

Here is my code:

var moduleCreateOrUpdateParameters = new ModuleCreateOrUpdateParameters()
{
   Name = module.Name,
   Location = ResourceGroupInfo.Location,
   Tags = null,
   Properties = new ModuleCreateOrUpdateProperties
   {
      ContentLink = new ContentLink
      {
         Uri = new Uri(module.Url),
         Version = module.Version
      },                       
    },               
};
var result = AutomationClient
                       .Modules
                       .CreateOrUpdate(ResourceGroupInfo.Name, 
                                                  AutomationAccountName, 
                                                  moduleCreateOrUpdateParameters);

Here is Az.Accounts module by azure-sdk (link which works fine with the code above:

name: Az.Accounts
url: https://www.powershellgallery.com/api/v2/package/Az.Accounts/1.5.2
version: 1.5.2

And the code does not work with nx package by MSFT_OSTC (link on Powershell Gallery):

name: "nx"
url: "https://www.powershellgallery.com/api/v2/package/nx/1.0"
version: "1.0"

Is there anything wrong with my code or Azure-SDK does not support such kind this function at this moment?

I really appreciate if any helps. thank you guys.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
zjalexandercommented, Aug 20, 2019

Hi, we took a look at the code and it seems fine. We also looked at the module you are trying to import and other people are able to successfully import it. We don’t filter module uploads by author at all.

Unfortunately it seems like you need to open a support ticket so we can figure out if there’s anything going on with your automation account in particular. By opening a support ticket and giving permission for us to access your data, we are able to see some backend data about your account which can help narrow down the cause. Sorry we couldn’t solve the issue here!

0reactions
minhhccommented, Sep 9, 2019

Just want to make a note here. I solved this issue by ignoring the version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NRWL NX importing lib error TS2307: Cannot find module ' ...
I found out how to fix my problem. So inside the tsconfig.app.json file, I added this to the paths. "@eduboard/interfaces" : [ "../../....
Read more >
Enforce Module Boundaries
Learn how to avoid dependency hell and scale a codebase by imposing constraints on your projects using the module boundary lint rule.
Read more >
Taming Code Organization with Module Boundaries in Nx
In our example above, we want to make sure projects in the scope:store does not import any angular packages, and projects from the...
Read more >
Angular library: Module not found error | by Tanya Gray
This project is an Angular app and Angular library in one project. The app consumes the library directly, not via npm. The error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found