Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected token '<' in nuxt #56

Open
kollol-dev opened this issue Mar 4, 2020 · 5 comments
Open

Unexpected token '<' in nuxt #56

kollol-dev opened this issue Mar 4, 2020 · 5 comments

Comments

@kollol-dev
Copy link

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 '<'

@hundrog
Copy link

hundrog commented Apr 14, 2020

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

@JohnWeidmann
Copy link

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

@asif92
Copy link

asif92 commented Jun 18, 2020

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

@andreitobias
Copy link

andreitobias commented Aug 31, 2020

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);

@quicombo
Copy link

quicombo commented Sep 22, 2021

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

stepper here FIXES THE PROBLEM WITH CSS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants