The variable `this.$vuetify.breakpoint` has not been defined

I am trying to create a table using Vuetify and Vue.

Currently, I am encountering the following error message: TypeError: this.$vuetify.breakpoint is undefined

This error occurs when using the v-data-table from Vuetify.

Error:

[Vue warn]: Error in render: "TypeError: this.$vuetify.breakpoint is undefined"

found in

---> <VData>
      <VDataTable>
        <AngebotsTable> at src/components/AngebotsTable.vue
          <AngebotsWrapper> at src/components/AngebotsWrapper.vue
            <App> at src/App.vue
              <Root>
<template>
  <v-data-table
    :headers="headers"
    :items="desserts"
    :items-per-page="5"
    class="elevation-1"
  ></v-data-table>
</template>

<script>
  export default {

  }
</script>

main.js

import Vue from 'vue'
import App from './App.vue'
import Vuetify from 'vuetify'
import 'vuetify/dist/vuetify.min.css'
import VueRouter from 'vue-router'

Vue.use(Vuetify)
Vue.use(VueRouter);

export default new Vuetify({  })


const router = new VueRouter({})

new Vue({
  el: '#wp-vue-app',
  router: router,
  Vuetify: Vuetify,
  render: h => h(App)
})

Could anyone offer assistance?

Answer №1

Make sure to include the vuetify option when setting up your Vue instance:

import Vue from 'vue'
import App from './App.vue'
import Vuetify from 'vuetify'
import 'vuetify/dist/vuetify.min.css'
import VueRouter from 'vue-router'

Vue.use(Vuetify)
Vue.use(VueRouter);

const vuetify = new Vuetify({})

const router = new VueRouter({})

new Vue({
  el: '#wp-vue-app',
  router: router,
  vuetify:vuetify,
  render: h => h(App)
})

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Making text strike-through when checkbox is marked

I am currently working on developing a To-Do list application using express and EJS middleware. The main feature of this app is to display a list of tasks with checkboxes next to each task added. When a task is completed, the user can mark it as done by ch ...

Validate Bootstrap - Transmit data from all form fields to external PHP script

Is there a way to send all input field values to a remote PHP file using Bootstrap Validator? In my log in form, I have two input fields. I'm utilizing Bootstrap Validator's remote validation on both of them. However, each validation only sends ...

Information is not stored within an array

After receiving data from an API, I attempted to store it in an array. However, when I tried to print the array, it was empty. The data retrieved is in JSON format. fetch("url") .then((response) => response.json()) .then((data) => ...

Is there a way to make the header reach the full width of the page?

Is there a way to make my header extend across the entire page? I attempted using margin-left and right, but it didn't yield the desired outcome. Header.css .header{ background: green; height: 70px; width: 100%; display: flex; ju ...

Trigger an alert box using JavaScript after a successful submission

PHP Script Explanation The following PHP script is executed once the corresponding form has been filled out: <?php $connect = mysql_connect($h, $u, $p) or die ("Connection Failed."); mysql_select_db($db); ## Prevent SQL Inje ...

What measures does Redux take to ensure race conditions do not occur?

Recently, I delved into Redux and grasped the concept very well. However, there is one particular line in the official documentation that puzzled me: Because all changes are centralized and happen one by one in a strict order, there are no subtle race ...

Tips for updating state and rendering in a function component in React Native:

I am attempting to update the state before rendering the component in a function component. While I have found suggestions to use the useEffect hook for this purpose, I am finding the information on the React official site somewhat perplexing. The docume ...

The initial step is duplicated in both "Intro.js" and "Intro.js-react"

The problem is as follows: Upon reloading, a pop-up appears in the upper left corner with an incorrect progress bar displaying 0, as shown in the screenshot below. https://i.sstatic.net/djCyf.png If you click on "Next", the same content reappears but th ...

Assigning a value to an attribute as either a "string" or null within JSON Schema while specifying a maximum length

I'm currently working on crafting a JSON schema that supports a nullable attribute. I am aiming to have the ability for specific JSON structures like this one be considered valid: { "some_name" : null } This is how my schema looks like: { "type" ...

Ready to Opt-Out in RxJS 6?

My test is functioning properly at the moment, but changing the active value causes it to break. Therefore, I am looking to unsubscribe a (which is the current active Observable) before proceeding with any other tests: let a:Observable<Todo> = store ...

Adding options to dropdown menu using data retrieved from an external JavaScript file

I recently took over a project and found that the original author had organized their code into separate JS files. One particular file contains all of the GET requests for things like Departments, Categories, Titles, etc. In another file named index.js, I ...

Issues with NightwatchJs arise when attempting to display element text, attributes, and values in the console

I'm facing some challenges with my nightwatch tests as I'm struggling to retrieve data from a webpage and display it on my console. Any guidance in the right direction would be greatly appreciated. Every time I attempt to log the data to my cons ...

What is the best way to include the title "addmoves" to the server using AngularJS?

https://i.sstatic.net/yR2fk.png Furthermore, I am looking to include a button that allows users to add additional movies. The goal is to input multiple sets of data simultaneously, such as: newMovies = [ { movieName:"", director:"", release ...

A step-by-step guide on creating a live crud application with vuex and socketio

I am struggling to achieve a realtime crud operation using vuex, node, express, and socketio with the current syntax provided. Here is the code snippet: Server index.js const server = app.listen('3000',() => { console.log('<--- ...

What could be the reason that when splicing an object from an array in JavaScript, the array itself is not returned?

I am working with an array of objects, such as a deck of cards: var deck = []; deck.push(new Card(suit, rank)); When I try to retrieve a card from the top or bottom of the deck, it works fine: var card = deck.pop(); var card = deck.shift(); However, if ...

The content in ACF appears to be missing when displayed in the fancybox

I have configured ACF to appear in a fancybox. The fields are being pulled in (as I can see the hardcoded header information), but nothing from the ACF appears. I have linked it to call an ID, which is then associated with the section that should be displa ...

A label in nativescript not displaying a two-digit number

I've encountered a peculiar issue with my user interface. I have a barcode scanner on my phone that scans barcodes and stores them in an observable array (which is functioning correctly). I also have a label that displays the length of the array. When ...

On a live server, the Bootstrap modal fails to function as intended

Trigger Button: while ($row = mysqli_fetch_array($result)) { $name = $row['name']; $id = $row['id']; echo '<a data-target="#exampleModal" class="wpmui-field-input button wpmui-submit button-primary" data ...

What is causing the error when trying to parse a JSON with multiple properties?

Snippet: let data = JSON.parse('{"name":"dibya","company":"wipro"}'); Error Message : An error occurred while trying to parse the JSON data. The console displays "Uncaught SyntaxError: Unexpected end of JSON input" at line 1, character 6. ...

Efficiently find alphabets in an array of strings by utilizing JavaScript

I have a list of various products shown below const allProducts = ['washing machine', 'sewing machine', 'refrigerator', 'desk'] If a user inputs any word in the search field, I want to display all matching products ...