Nuxt · Browser APIs
NUXT0070Use useClipboard for clipboard access
Finds VueUse project code that should use the supported useClipboard pattern instead.
vite-doctor/vueusebrowser-apiinfoSuggestion
Why it happens
Direct clipboard calls require support checks, permission handling, copied state, and cleanup that useClipboard() already provides.
Fix
Use VueUse useClipboard() instead of wiring navigator.clipboard directly.
Example
Use VueUse clipboard
Before
async function copy(text: string) {
await navigator.clipboard.writeText(text)
}
After
const { copy } = useClipboard()
Verify the fix
Run only this rule after editing so the report stays focused on the diagnostic you are closing:
pnpm nuxt doctor --rules vueuse/prefer-useclipboard