Duolith docs

Errors E0200 to E0299

E0220 Not an effect

Message name is not an export of @duolith/effects

Words in italics are filled in when the compiler reports it, such as the element's name or the list of known ones.

Why

Platform effects are imported by name from @duolith/effects, such as import { camera, signIn } from "@duolith/effects". The build reads those names to ship the effects the app uses and to write the permission declarations each target needs (decision 0051), so a namespace import, an import that names nothing (import "@duolith/effects" or import {} from), an import("@duolith/effects") at run time, which the build never sees, or a name that is not an effect, is refused. The effects are listed in spec/effects/effects.yaml.

How to fix it

Correct the name, or import the effects by name at the top of the script rather than with import * as, a bare import or import().

In a terminal

duolith explain E0220

Mentioned in