Could not find gn executable at: C:\...\buildtools\win\gn.exe

1.7k Views Asked by At

I'm running into the following error:

Could not find gn executable at: C:\...\JavaScriptApplications\electron\buildtools\win\gn.exe

after running the following gclient command as part of the instructions to build electron from source:

gn gen out/Release --args="import(\"//electron/build/args/release.gn\")"

Note: I've already found some possible solutions that I would like to share in order to help anyone else running into this error.

1

There are 1 best solutions below

0
On

Initially, I ended up resolving the issue by manually creating the folder structure buildtools\win\ at the specified path and then moving the gn.exe file I downloaded from the gn website into it.

Later I realized the issue could be due to me running that gclient command in a Git Bash terminal in VSCode instead of the intended Command Prompt.

Indeed, running the gclient commands via Command Prompt as Administrator worked as expected.