Reply to Could not build module 'Darwin' error xnu build script would corrupt the macos.sdk, download https://github.com/alexey-lysiuk/macos-sdk the correct sdk from here. replace the corrupted one with this one. job done. Developer Tools & Services Xcode Jan ’22