Forum Discussion

TusharBhagat's avatar
TusharBhagat
Copper Contributor
May 06, 2019

How to fix error while creating Tool extension from Windows Admin Center CLI

This is related to developing extension for Windows Admin Center. There is SDK provided for the same by Microsoft to develop extensions. here is detail documentation which I was following "https://docs.microsoft.com/en-us/windows-server/manage/windows-admin-center/extend/developing-extensions"

Create tool extension:

Referring to section "Prepare your development environment" I have installed prerequisites.

After that I tried to next step to create tool by using Windows Admin Center CLI. I executed following command

wac create --company "Contoso Inc" --tool "Manage Foo Works"

But system gives following error

const { readdir, stat } = require('fs').promises; TypeError: Cannot destructure property readdir of 'undefined' or 'null'.

Is there something missing while creating development environment.

Environment details

Windows 10 Professional, npm@6.9.0, node@v9.11.1, angular cli: 6.1.5, typescript 2.9.2

  • TusharBhagat Can you run this in the same path you are trying to create an extension:

    npm list

    and let me know which version of the windows-admin-center-cli you have installed? 

    • TusharBhagat's avatar
      TusharBhagat
      Copper Contributor

      alexanderboswell 

      I am little bit confused about version I can get for different CLI.

      When I execute npm List in the same folder where I am going to create extension I am getting package version as windows-admin-center-cli@0.1.26 or if latest installed then windows-admin-center-cli@0.1.29

      But I get different output when I am executing command npm wac-cli -v  

      6.9.0

       

      But answer to your question, I am getting version 0.1.26

      • alexanderboswell's avatar
        alexanderboswell
        Icon for Microsoft rankMicrosoft

        TusharBhagat I believe this error might of been fixed in a recent version. Can you try installing  windows-admin-center-cli@0.1.29 and see if you get the same issue?  I am not sure what wac-cli is referring to as we do not have versions that high.

Resources