DomJM
DomJM12mo ago

Issues getting local environment running in VSCode and Visual Studio 2022

I'm a windows user trying to contribute on an github issue, but I've run into a few blockers. Using my IDE of choice, VSCode, I couldn't complete the build step. I ended up following the docs and trying Visual Studio 2022, which completed the build step with 0 friction. My main blocker with Visual Studio 2022 is that when I attempt to open the Deno repo folder, it freezes, then crashes. Broadly speaking, I'm wondering if anyone else has encountered this issue with Visual Studio 2022? I'd also be interested in hearing if any other windows users have been able to contribute with VSCode, as that would be preferential for me to work in. The error I'm getting in VSCode on running cargo build -vv is as follows:
--- stderr
thread 'main' panicked at '
failed to execute command: program not found
is `cmake` not installed?
--- stderr
thread 'main' panicked at '
failed to execute command: program not found
is `cmake` not installed?
10 Replies
marvinh.
marvinh.12mo ago
iirc most of the team uses vscode, including folks on windows. The error sounds like the cmake.exe cannot be found in the systems PATH variable. Maybe the windows folks here can chime in?
DomJM
DomJM12mo ago
Thanks for the quick response! That's good super insightful, hopefully it's something simple I'm just overlooking.
rustbull
rustbull12mo ago
I actually encountered this same issue on MacOS. tl;dr cmake is a required build tool. I don't have a Windows machine to test the installation, but I believe you can download the binaries here: https://cmake.org/download/
ioB
ioB12mo ago
I've never heard of someone using Visual Studio 2022 to develop Deno. I'm sure it works, but most of the setup instructions I've seen are around VSCode.
DomJM
DomJM12mo ago
Oh I'll make sure to try this! Thanks for recommending this solution The docs for contributing tell windows users to use Visual Studio 2019 for Cmake and a few other options:
For Windows users:

Get VS Community 2019 with “Desktop development with C++” toolkit and make sure to select the following required tools listed below along with all C++ tools.
Visual C++ tools for CMake
Windows 10 SDK (10.0.17763.0)
Testing tools core features - Build Tools
Visual C++ ATL for x86 and x64
Visual C++ MFC for x86 and x64
C++/CLI support
VC++ 2015.3 v14.00 (v140) toolset for desktop
For Windows users:

Get VS Community 2019 with “Desktop development with C++” toolkit and make sure to select the following required tools listed below along with all C++ tools.
Visual C++ tools for CMake
Windows 10 SDK (10.0.17763.0)
Testing tools core features - Build Tools
Visual C++ ATL for x86 and x64
Visual C++ MFC for x86 and x64
C++/CLI support
VC++ 2015.3 v14.00 (v140) toolset for desktop
If there is a method of doing this in VSCode I would love to be able to!
ioB
ioB12mo ago
Deno doesn't use C++? Where is this from?
DomJM
DomJM12mo ago
Deno
Building from Source | Manual | Deno
Below are instructions on how to build Deno from source. If you just want to use Deno you can download a prebuilt executable (more information in the [Getting Started](../../getting_started/install
DomJM
DomJM12mo ago
I'm starting to feel like I went down the wrong alleyway with this blobsweat
ioB
ioB12mo ago
Yeah, unless you want to build v8 from scratch (you don't), you don't need to do this
DomJM
DomJM12mo ago
Ah ok that makes sense. When I saw I was having trouble with Cmake in VSCode I re-referenced the docs and saw that these docs seemed to have a way of handling it. Appreciate your help! I'll try @rustbull's solution/Cmake specific solutions with VSCode. Thank you! Downloading the binary seemed to have worked! I was able to run cargo test integration::test which seems to be all I need for my issue. Thanks so much for the help everyone