E0222 Effect not available here
Words in italics are filled in when the compiler reports it, such as the element's name or the list of known ones.
Why
Some effects need something this device or browser does not have: purchases need the App Store or Google Play, so the web has none; secure storage and push need a secure page (https or localhost); the camera needs a camera. The effect's state says so before anything is called (purchases.available, camera.available), so a page can show something else.
How to fix it
Check the effect's availability before calling it, and show the user what to do instead.
In a terminal
duolith explain E0222
Mentioned in
- Device effects
- Platform effects
- 0050. Effects are imported by name from @duolith/effects, and each contract has an app-facing half and a platform half
- 0052. On the web, secure storage encrypts with a non-extractable key, and sign-in redirects with PKCE
- 0101. The device effects, and how each says a platform cannot