RX0079

Domain: Parsing

Error message

%s (%s)

In the message, %s marks a value that the engine fills in when it raises the error.

The story

You used a domain directive in a place where it does not belong, or you used it wrongly. Let me explain what domain is for. It separates declaring things from executing things. It is a file directive only, meaning it lives on the first line of a file, and nowhere else. It is not a value that you can compute at runtime. On that first line, it names one realm: declare, call, or script. And it only works if your project's manifest.rush has turned on the setting called separate declaration from execution. So three things can go wrong. You wrote it somewhere other than the first line of a file. You wrote it without naming a realm. Or the project did not enable the separation in its manifest. The message shows what the engine found and the context. Check the first line of the file, name exactly one realm, and make sure the manifest says the setting is true. Then the directive will be accepted.

Text from the Rush engine's error catalogue.