Duolith docs

Errors while checking a page

E0172 Markup in a behaviour file

Message A behaviour file holds a script block and nothing else

Why

A .behaviour.duo file is a script block between --- lines and nothing else: it has no view, so markup, a <style> block or a <slot> after the script would never be shown (decision 0152). A .behaviour.ts file is only script, so it cannot have any.

How to fix it

Move the markup and styles into a component that calls the behaviour, or remove them.

In a terminal

duolith explain E0172

Mentioned in