How can I resolve "could not use PowerShell to find Visual Studio 2017 or newer" while installing kibana

Hi,

I have visual studio 2022 community and visual studio 2022 build tools installed and config them with npm. But when I try to install kibana I encounter this error:

could not use PowerShell to find Visual Studio 2017 or newer

This indicates that the installation process is unable to find the path to the PowerShell and visual studio 2015 C++.

I have tried to run all the commands with the admin level and still the same node-gyp errors occur.

How can I get past these errors?
I appreciate hints.

are you trying to build kibana or just run kibana?

Thank you for the reply.

My initial aim is to build but I think to be able to do that I need to run kibana and Elasticsearch as prequisites.

This is the path I've followed so far:

I cloned kibana and followed this guide for getting started. I had many errors and I resolved most of them except for this one.

could not use PowerShell to find Visual Studio 2017 or newer

I switched to docker and pulled both kibana and elasticSearch.

Then I considered that I need to install both of them separately as well. Now I installed kibana but not elasticSearch.

I can generate the enrollment token on docker via the Elasticsearch terminal but I have not been able to get the validation key. I'll re-follow this guide to find more insights.

I might have missed some stages here. I appreciate any inputs I receive.