Vite was anticipating to find a "greater than" sign, however it encountered the word "class" instead

I keep encountering these issues when running vite build. It's as if Vite is struggling to properly interpret the HTML.

Expected ">" but encountered "class"
1  | <template>
2  |      <div class="dashboard container">
   |           ^
3  |          <div class="columns has-margin-b25 has-margin-t40 is-gapless">
4  |              <div class="column is-flex">
...
n  | </template>
Unexpected "/"
1  |  <template>
2  |      <div>
3  |          <navbar></navbar>
   |                   ^
4  |          <page-header
...
n  | </template>

The technologies I am using include Vue2, Typescript, vue-property-decorator, vue-template-compiler and vue-class-component.

Additionally, there are a few peculiarities that stand out:

  1. The build process runs smoothly on the server, but not locally. Even though the npm, node, and package versions are consistent (including global packages).
  2. Occasionally, the build will succeed locally, but it seems to be quite random (about every 20th attempt or so)
  3. Failure during the build process usually occurs in different files each time
  4. Interestingly, Vite dev consistently functions without any issues

Answer №1

If you're encountering errors, it's likely due to issues in your HTML template. One way to check for correctness is by using the following website to validate the format of your HTML template:

https://validator.w3.org/

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

Issue with Axios Response Interceptor on Vuejs causing failure to pass response data

axios.interceptors.response.use( (response) => { return response }, async (error) => { const instance = axios.create({ baseURL: 'myrestbase', timeout: 1000, headers: { 'Authorization': 'Bearer T ...

Adding HTML elements to a Vue Tooltip

Does anyone know how to implement a tooltip in Vue for a table cell that has more than 22 characters in its content? I was looking into using the v-tooltip library (https://www.npmjs.com/package/v-tooltip) Setting the tooltip's content with a simple ...

VueJS form validation does not account for empty inputs in both fields

One of the challenges I'm facing is generating a form with Vue.js using the input fields below: { name: 'first_name', type: 'text', label: 'First Name', placeholder: 'First Name', ...

Having issues with Vue.js when using Vue-strap Radio Buttons

While developing my web application with vue.js, I encountered an issue with radio buttons when I switched to using bootstrap style. I understand that I need to use vue-strap for proper data binding with bootstrap styled radio buttons in vue.js, but I am s ...

Strategies for extracting taginput information from an API

I have a collection of tags stored in a database that I can retrieve using an API. Although I am able to use these tags within my template, I am facing issues specifically when trying to display them in the tag list. As someone who is new to Vue.js, I sus ...

How can you effectively blend Vue/Angular with other JavaScript resources to enhance your development process?

My curiosity lies in understanding how front-end javascript libraries such as Vue and Angular can seamlessly integrate with other libraries and assets. For instance, if I were to procure a website template already equipped with additional javascript, is it ...

Tips for structuring your vuex store in conjunction with websocket mutations

Currently, I am utilizing vue+vuex+vue-native-websocket to manage my operations. As per the documentation's guidance on dealing with websocket messages using vuex, it is advised to utilize SOCKET_... mutations. At present, I tackle all incoming messa ...

"Troubleshooting: NuxtJs vue-flip feature stuck on front side, not rotating to

I have recently installed the vue-flip plugin in a NuxtJs (VueJS) project that I created using the command: npx create-nuxt-app <project-name>. In the index.vue file, I simply added: <vue-flip active-click="true"> <div slot="front"> ...

How to conceal sections of a webpage until a child component is successfully loaded with vue

I am currently working on a Single Page Application using Vue. The default layout consists of some HTML in the header, followed by an abstract child component that is injected into the page. Each child component has a loader to display while the data is be ...

Displaying a component in a router view based on specific conditions

Currently, I am delving into the world of Vue3 as a newcomer to VueJS. In my project, there is an App.vue component that serves as the default for rendering all components. However, I have a Login.vue component and I want to exclude the section when rende ...

Is there a way to send arguments to a pre-existing Vue JS application?

A Vue application we've developed connects to a Web Service to retrieve data. However, the URL of the web service varies depending on the installation location of the app. Initially, we considered using .env files for configuration, but realized that ...

Assigning a new classification to the primary object in the evolving array of objects

I'm working with an element that loops through all the objects using v-for and has a CSS class named top-class{}... I need to dynamically add the top-class to the first object (object[0]) and update it based on changes, removing the old top-class in t ...

VueJS - Harnessing the power of the Document Object Model for dynamic template rendering

Essentially, I am in need of VueJS to provide warnings for unregistered components when in DOM template parsing mode. It seems that currently Vue does not pay attention to custom HTML when using DOM templates, although errors are correctly displayed with s ...

Vue js version 2.5.16 will automatically detect an available port

Every time I run the npm run dev command in Vue.js, a new port is automatically selected for the development build. It seems to ignore the port specified in the config/index.js file. port: 8080, // can be overwritten by process.env.PORT, if port is in u ...

I'm searching for the icon list within Shopware 6, where could it be located?

Is it possible to include an icon in a post using the sw_icon command? For instance: {% sw_icon 'head' %} Are there any alternatives to using 'head' for this command? ...

Deactivating a Vue custom filter when hovering over it

I'm trying to figure out how to disable a truncate filter when hovering over an element using VueJS 2. Here's the part of my template that includes the filter: <div class="eng" @mouseover="showAll">{{ word.english | truncate }}</div> ...

What could be causing Vue Material dialogs to frequently slide off the screen?

I am currently utilizing a dialog feature from Vue Material (). After following the link and opening the first custom dialog on the page, I noticed that it tends to shift towards the top left of my screen, making only a portion of the dialog visible. This ...

Ensuring that a date is in the past using VeeValidate

Hey there! I'm working on validating a date of birth field in Vue.js to only allow dates prior to today. However, I'm a bit unsure about how to leverage the before and date_between attributes. The code snippet below shows what I'm trying to ...

Tips for combining Nuxt with Vue Cli 3

section: My current setup involves utilizing Nuxt.js to set up my Vue application. I'm curious if it's feasible to incorporate Nuxt into a Vue Cli 3 project in order to leverage the advantages of both platforms. Surprisingly, there doesn't ...

Implement VueJS functionality to prevent form submission upon submission and instead submit the form upon keyup

My form has the following structure: <form id="myForm" action="/searchuser" method="POST" @submit.prevent="onSubmit(inputValue)"> <div class="field"> <label class="label">Name</label> <div class="control"> ...