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

Uncaught SyntaxError: Unexpected token < #12

Open
chhpt opened this issue Jul 28, 2017 · 3 comments
Open

Uncaught SyntaxError: Unexpected token < #12

chhpt opened this issue Jul 28, 2017 · 3 comments

Comments

@chhpt
Copy link

chhpt commented Jul 28, 2017

I met a problem when I use v-bar with vue@2.4.2. It is like this:

/Users/wuyiqing/Desktop/data-manager-front-end/node_modules/v-bar/src/components/v-bar.vue:1 
Uncaught SyntaxError: Unexpected token <
    at Object.exports.runInThisContext (vm.js:78)
    at Module._compile (module.js:543)
    at Object.Module._extensions..js (module.js:580)
    at Module.load (module.js:488)
    at tryModuleLoad (module.js:447)
    at Function.Module._load (module.js:439)
    at Module.require (module.js:498)
    at require (internal/module.js:20)
    at eval (webpack-internal:///90:1)
    at Object.<anonymous> (renderer.js:1281)

At first, I thought it was because of the version of vue. But it was not work when I changed the Vue to 2.3.3.

@luiguild
Copy link
Owner

luiguild commented Aug 8, 2017

Hi @chhpt!

No one else are report the same issue yet. I will try reproduce and I give you feedback soon...

@eljass
Copy link

eljass commented Oct 18, 2017

I got the same issue with Nuxt.js. Scrollbar works as expected but my console has the warning:

[vue-router] Failed to resolve async component default: SyntaxError: Unexpected token <
[vue-router] uncaught error during route navigation:
/Users/xxx/xxx/xxx xxx/xxx-xxx/node_modules/v-bar/src/components/v-bar.vue:1
(function (exports, require, module, __filename, __dirname) { <style scoped lang="sass">
                                                              ^

SyntaxError: Unexpected token <
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:537:28)

    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at r (/Users/xxx/xxx/xxx xxx/xxx-xxx/node_modules/vue-server-renderer/build.js:7758:16)
    at Object.<anonymous> (server-bundle.js:4359:18)
    at __webpack_require__ (server-bundle.js:27:30)
    at Object.108 (pages/index/signIn.2a00ee66685cbbeda3ef.js:10:64)
    at __webpack_require__ (server-bundle.js:27:30)
    at Object.78 (pages/index/signIn.2a00ee66685cbbeda3ef.js:359:285)
    at __webpack_require__ (server-bundle.js:27:30)

@mavrick
Copy link

mavrick commented Apr 30, 2018

the module needs to be compiled with vue-loader to work in an ssr environment

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

No branches or pull requests

4 participants