# Vue: [plugin:vite:vue] v-else/v-else-if has no adjacent v-if or v-else-if.

**Code:** `v-else/v-else-if has no adjacent v-if` · **Category:** Vue · **Seen on:** Vue

A `v-else` element isn't directly after a `v-if`/`v-else-if` sibling.

## Meaning

Keep the chain contiguous: no other elements (or comments in some cases) between `v-if` and `v-else`. Wrap blocks in `<template>` if you need multiple elements, and don't put `v-else` on a root without a matching `v-if` sibling.

## Common causes

- Element inserted between v-if and v-else
- v-else at the start/without v-if
- Whitespace-only comments with condense
- Different parents
- Typo (`v-else if`)

## Quick fix

1. Place `v-else` immediately after the `v-if` sibling
2. Use `<template v-if>`/`<template v-else>` for groups
3. Check `v-else-if` spelling

## Detailed fix by platform

### Vue

1. `<p v-if="a">A</p><p v-else-if="b">B</p><p v-else>C</p>`

## How to diagnose

1. **Siblings** — Adjacent?
2. **Typo** — v-else-if?
3. **Group** — template?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/vue/vue-error-v-else-no-adjacent-v-if)
