In my case I had a semicolon after the screen element. Semicolons aren't allowed as children, it threw this error. Double check the syntax of whatever's a child of your navigator.