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

Copper Contributor

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 ""

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

8 Replies

@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? 


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  



But answer to your question, I am getting version 0.1.26

@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.


I have installed latest windows admin center with version 0.1.29 and tried same command as

"wac create --company Microsoft --tool Foo --version insider"

But still I am getting same error as shown in attached image

@TusharBhagat I am still looking into this issue. I am having a difficult time trying to reproduce the issue. I will provide any update when it is available.

@TusharBhagat can you try doing these installs again? (

npm install -g npm

npm install -g @angular/cli@1.6.5

npm install -g gulp
npm install -g typescript
npm install -g tslint
npm install -g windows-admin-center-cli

I have followed our documentation found here:

I set up a clean environment in Windows Sandbox and followed the documentation. If this does not provide any change please provide any more details you have as I still cant reproduce this issue (npm version and node versions)

@alexanderboswellThanks for your reply.

I have followed the process but unfortunately I am facing same problem. But I can proceed with the changes suggested in GIT PR raised by @nitinpawar28

I will try to do it on clean machine and will let you know.