shaqaruden
1 year ago
320
9
Vue

template or render function not defined.

Posted 1 year ago by shaqaruden

I have started a project from scratch bringing in Laravel Mix, Tailwind, and VueJS.

I created my first component to test

<template>
    <div>
        <h1 class="bg-green text-blue">Hello World!</h1>
    </div>
</template>

<script>
export default {
    data() {
        return {
            
        }
    }
}
</script>

<style lang="css">
</style>

and registered in in app.js

window.Vue = require('vue');

Vue.component('pacerboard', require('./components/PacerBoard.vue'));

const app = new Vue({
    el: '#app'
});

and then try to display it

<!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="css/app.css">
</head>
<body>
    <div id="app">
        <pacerboard></pacerboard>
    </div>
    <script src="js/app.js" charset="utf-8"></script>
</body>
</html>

but I am getting an error when loading the page

Image of Error

Please sign in or create an account to participate in this conversation.