Unexpected token '<' in nuxt
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 '<'
I also had this problem, apparently its form the plugin itself, cause I got the error just with the import line
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
I'm also facing this issue. Kindly provide a solution for it. Thanks
If anyone is still facing this issue, here's what worked for me:
- Add the plugin in your
nuxt.confing.jsfile:
plugins: [ { src: "~/plugins/vue-stepper", mode: "client" } ]
- Create the plugin file (
vue-stepper.js) and import it there:import Vue from "vue"; import HorizontalStepper from "vue-stepper"; Vue.component("HorizontalStepper", HorizontalStepper);
with plugin it works fine. But when you reload a page - all css are gone(