Since it's working on other projects, the issue is not related to the code you provided so it's hard to say what the cause is without more context. The error message still make me think that there is a custom type called Button somewhere so the compiler uses it instead of the SwiftUI component. Can you tried using SwiftUI.Button { ... } instead of Button to be 100% sure it's not the case ? If the problem persist I would suggest using 'git bisect' to find the commit that started all this