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

Error with livescript-loader #135

Closed
chrisvfritz opened this issue Jan 17, 2016 · 6 comments
Closed

Error with livescript-loader #135

chrisvfritz opened this issue Jan 17, 2016 · 6 comments

Comments

@chrisvfritz
Copy link

I have a minimal app here to produce the error. This is what I'm getting:

ERROR in ./~/livescript-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
Module build failed: SyntaxError: unterminated regex on line 3
at /[...]/my-vue-project/node_modules/vue-loader/lib/selector.js?type=script&index=0!/[...]/my-vue-project/src/App.vue
    at SyntaxError (native)
    at carp (/[...]/node_modules/livescript/lib/lexer.js:1220:9)
    at Object.exports.carp (/[...]/node_modules/livescript/lib/lexer.js:1214:3)
    at Object.exports.doRegex (/[...]/node_modules/livescript/lib/lexer.js:498:10)
    at Object.exports.tokenize (/[...]/node_modules/livescript/lib/lexer.js:78:19)
    at Object.exports.lex (/[...]/node_modules/livescript/lib/lexer.js:4:26)
    at Object.exports.compile (/[...]/node_modules/livescript/lib/index.js:45:32)
    at Object.module.exports (/[...]/my-vue-project/node_modules/livescript-loader/index.js:22:23)
 @ ./src/App.vue 2:17-115

It seems that as soon as I include even an empty script tag for LiveScript, the entire file is parsed as LiveScript, resulting in an error trying to parse this:

<template>
  <div id="app">
    <h1>Test</h1> <!-- ERROR HERE -->
  </div>
</template>

<script lang="livescript">
</script>

I have confirmed a similar setup with coffee-loader works, which livescript-loader is based on. Any ideas?

@borestad
Copy link

Please try my package here and see if it works for you
https://www.npmjs.com/package/vue-livescript-loader

@chrisvfritz
Copy link
Author

@borestad Thanks! It seems to be experiencing the same problem unfortunately. 😕 I updated my example project to demonstrate the issue.

@laurentpayot
Copy link

+1, same issue here…

@BlackGlory
Copy link

Hi, @laurentpayot
Please look at the https://github.com/vuejs/vue-loader/pull/289/files, solve the problem just need to modify one line of code, wait for merge.

@laurentpayot
Copy link

Thanks a lot @BlackGlory , it did the trick! :+1: Looking forward to your commit being merged.

@yyx990803
Copy link
Member

Closing (outdated)

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

5 participants