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: Unexpected token with dynamic SVG xhlink:href properties #470

Closed
ccampbell opened this issue Apr 12, 2017 · 2 comments
Closed

Error: Unexpected token with dynamic SVG xhlink:href properties #470

ccampbell opened this issue Apr 12, 2017 · 2 comments
Labels

Comments

@ccampbell
Copy link

Just tried to update my svelte to latest and started getting compilation errors.

Looks like a regression introduced in version 1.13.7.

Works:
https://svelte.technology/repl?version=1.13.6&gist=b2df7e04cdacd4e8cf78e4678a69133a

Compilation error:
https://svelte.technology/repl?version=1.13.7&gist=b2df7e04cdacd4e8cf78e4678a69133a


Also, it would be nice if the error message was a little nicer. The output I see is:

[02:07:51] Error: Unexpected token (194:19)
    at error (/Users/craig/Sites/project/node_modules/rollup/dist/rollup.js:170:12)
    at /Users/craig/Sites/project/node_modules/rollup/dist/rollup.js:8937:6
    at process._tickCallback (internal/process/next_tick.js:103:7)

So I had to start commenting out my code bit by bit to find what specifically it was breaking on. I am lucky it happened to be in the first file I commented out 😛

@Rich-Harris
Copy link
Member

Ah, yep, this is the code that's being generated:

screen shot 2017-04-12 at 8 06 11 am

Rich-Harris added a commit that referenced this issue Apr 12, 2017
replace all invalid characters in attribute names when creating variables
@Rich-Harris
Copy link
Member

Fixed in 1.14.1. Thanks!

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

No branches or pull requests

2 participants