Static GitHub Issues

[1623] [bug] Unable to get started, basic template doesn't work.

prev: Website not working while 'npm run build'
next: Manually reordering routes

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.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1449">#c1449</a>)</em></sub></div>