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 { (Nuxt) #6

Closed
Ovyerus opened this issue Feb 14, 2019 · 12 comments
Closed

Unexpected token { (Nuxt) #6

Ovyerus opened this issue Feb 14, 2019 · 12 comments

Comments

@Ovyerus
Copy link

Ovyerus commented Feb 14, 2019

Using Nuxt, when I try to load the library in the way shown in the examples, I get an Unexpected token { syntax error. My guess from looking at the bundled/compiled code in the package, is that for reason some the ES6 import/export statements are causing it, but I'm not sure.

@WipeAir
Copy link
Contributor

WipeAir commented Feb 14, 2019

Hey,
I haven't tried the library with Nuxt yet. I'll try to fix it and get back to you asap!

@Ovyerus
Copy link
Author

Ovyerus commented Feb 14, 2019

👍

@WipeAir
Copy link
Contributor

WipeAir commented Feb 20, 2019

Sorry for the delay!
I've changed the module system to commonjs in v1.3.0 (already published on npm).
Hopefully it solves your problem! If you have any further problems, don't hesitate to reply.

@Ovyerus
Copy link
Author

Ovyerus commented Feb 21, 2019

Looks like it's still happening. Took a look at the file again and it looks like it still has ES6 imports. Possibly forgot to rebuild for it?

Also made a barebones Nuxt project (using create-nuxt-app) just to ensure it's the lib and not me, and it still occurs.

@WipeAir
Copy link
Contributor

WipeAir commented Feb 21, 2019

You may retry it now - v1.3.1

@Ovyerus
Copy link
Author

Ovyerus commented Feb 21, 2019

Alright seems to be fixed in v1.3.1 now. I seem to be getting a compile error for one of my components but unsure if it's the plugin or me. Removing it works fine though.

Thanks for the help 👍

@Ovyerus Ovyerus closed this as completed Feb 21, 2019
@Ovyerus
Copy link
Author

Ovyerus commented Feb 22, 2019

On second look it seems to be occuring with, any input element I try to make, which is bizarre.

https://gist.github.com/Ovyerus/a89b9120b9209f6f2db89cbb70cb8f47

@WipeAir
Copy link
Contributor

WipeAir commented Feb 22, 2019

What do you exactly mean with input element in this case?
The plugin is not bound to any component directly...

@Ovyerus
Copy link
Author

Ovyerus commented Feb 22, 2019

Any <input>. When there's none in the current view it seems to work fine, but when there's one it causes an error like shown above. Not sure why exactly. Doesn't occur when the plugin isn't loaded as well it seems.

@WipeAir
Copy link
Contributor

WipeAir commented Feb 22, 2019

Ok, that's crazy. Is this problem reproducible in a simple Nuxt app? If so, can you provide me an example project? Then I could look into it :)

@Ovyerus
Copy link
Author

Ovyerus commented Feb 22, 2019

Alright so I go to test it in a clean one, and of course it doesn't come up, even when I try testing it again in the main project. I'll try to see if I can properly recreate it if it crops up again.

Only thing I can think that's different is that it was occuring on my laptop, but not sure why that'd change anything.

@WipeAir
Copy link
Contributor

WipeAir commented Feb 22, 2019

Ok, good to hear that it works.
If it occurs again just create a demo project and send it to me.

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

2 participants