May 05 2019 08:35 PM
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-extens..."
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
May 13 2019 08:44 AM - edited May 13 2019 08:45 AM
@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?
May 14 2019 09:53 PM
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
May 15 2019 08:27 AM
@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.
May 16 2019 08:46 AM
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
May 29 2019 09:50 AM
@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.
May 30 2019 03:14 PM - edited May 30 2019 03:15 PM
@TusharBhagat can you try doing these installs again? (https://docs.microsoft.com/en-us/windows-server/manage/windows-admin-center/extend/prepare-developme...)
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: https://docs.microsoft.com/en-us/windows-server/manage/windows-admin-center/extend/developing-extens...
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)
Jun 10 2019 04:47 AM
@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
https://github.com/microsoft/windows-admin-center-extension-template/pull/49
I will try to do it on clean machine and will let you know.
Jun 24 2019 03:03 PM
@TusharBhagat Did the above fix work for you?