I'm not able to get a very basic template working. I started my first app, and I have a single file:
pages/index.vue:
<template>
<p>
<h1>Hello world!</h1>
</p>
</template>
<style>
p {
border: 5px solid teal;
}
</style>
and Nuxt throws an error that doesn't seem right:
ERROR Failed to compile with 1 errors 17:10:27
error in ./nuxt/pages/index.vue
(Emitted value instead of an instance of Error)
Error compiling template:
<p>
<h1>Hello world!</h1>
</p>
- Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.
@ ./nuxt/pages/index.vue 10:0-245
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi webpack-hot-middleware/client?name=client&reload=true&timeout=3000&path=/__webpack_hmr ./.nuxt/client.js
I have a single <p>
root element in the template, I don't see why it would throw this error.