abp generate-proxy -t ng command is throwing an exception on a macOS (Monterey 12.4) using ABP CLI v5.2.1.

I cannot reproduce it on my windows pc, looks like problem is related to macOS in general or to that concrete mac. Updating abp cli and other npm packages didn't solve the issue.
Any ideas how to fix the problem?