vue-stepper icon indicating copy to clipboard operation
vue-stepper copied to clipboard

Unexpected token '<' in nuxt

Open kollol-dev opened this issue 5 years ago • 5 comments

This is how I imported the component

import HorizontalStepper from "vue-stepper"; import StepOne from "~/components/service_steps/stepOne"; import StepTwo from "~/components/service_steps/stepTwo"; export default { components: { HorizontalStepper },

But it is giving error of

Unexpected token '<'

kollol-dev avatar Mar 04 '20 13:03 kollol-dev

I also had this problem, apparently its form the plugin itself, cause I got the error just with the import line

hundrog avatar Apr 14 '20 13:04 hundrog

I had this problem - i just created my own component and copied and pasted all the code into there and it works. Definitely still needs some finesse to get it to work

JohnWeidmann avatar Apr 24 '20 13:04 JohnWeidmann

I'm also facing this issue. Kindly provide a solution for it. Thanks

asif92 avatar Jun 18 '20 07:06 asif92

If anyone is still facing this issue, here's what worked for me:

  1. Add the plugin in your nuxt.confing.js file:

plugins: [ { src: "~/plugins/vue-stepper", mode: "client" } ]

  1. Create the plugin file (vue-stepper.js) and import it there: import Vue from "vue"; import HorizontalStepper from "vue-stepper"; Vue.component("HorizontalStepper", HorizontalStepper);

andreitobias avatar Aug 31 '20 09:08 andreitobias

with plugin it works fine. But when you reload a page - all css are gone(

stepper here FIXES THE PROBLEM WITH CSS

quicombo avatar Sep 22 '21 12:09 quicombo