Yarn fails with error: .... nsfw/oniguruma: Command failed

Hello everyone, I am trying to build and run theia on windows 10 box and stucked when running “yarn” . I am getting errors where the error message is different on every run

error C:\work\theia\node_modules\nsfw: Command failed.
or
error C:\work\theia\node_modules\nsfw: Command failed.

no corporate proxy, windows 10 , python 2.7.15, node 10.16.3, yarn 1.19.1, folder path: c:\work\theia

Any hints will be appreciated.

Here’s part of the console output

warning “@theia/cli > @theia/application-manager > font-awesome-webpack > less-loader@2.2.3” has incorrect peer dependency “less@^2.3.1”.
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages…
[1/8] ⠂ nsfw
[6/8] ⠂ find-git-repositories
[3/8] ⠂ @theia/node-pty
[4/8] ⠄ drivelist
error C:\work\theia\node_modules\nsfw: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\work\theia\node_modules\nsfw
Output:
C:\work\theia\node_modules\nsfw>if not defined npm_config_node_gyp (node “C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin…\node_modules\node-gyp\bin\node-gyp.js” rebuild ) else (node “” rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.16.3 | win32 | x64
gyp info spawn C:\Python27\python.exe

Dump from another trial with different error

[6/8] ⠂ find-git-repositories
[3/8] ⠄ @theia/node-pty
[4/8] ⠄ drivelist
error C:\work\theia\node_modules\oniguruma: Command failed.
Exit code: 1
Command: node-gyp rebuild

[original thread by xman892]

[xman892]

Solved in 2 sateps: Had to install C++ support for my VS2019 and set the correct path to MSBuild via “npm config set msbuild_path …”

[Peter Haumer]

Some good tips here: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#building-on-windows