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

ParseError: RightParenthesis is expected #6

Closed
wighawag opened this issue Jun 26, 2020 · 3 comments
Closed

ParseError: RightParenthesis is expected #6

wighawag opened this issue Jun 26, 2020 · 3 comments

Comments

@wighawag
Copy link

Getting this error

it might be related to #5 and how svelte process css somehow, but maybe not ?

Interestingly (which is the issue I encounter in #5) if I import a17t after tailwind directive (see https://github.com/wighawag/a17t-svelte-test) none of a17t css get included and I do not get the error

$ rollup -c -w
rollup v2.18.0
bundles src/main.js → public\build\bundle.js...
[!] (plugin svelte) ParseError: RightParenthesis is expected
src\Tailwindcss.svelte
70535:     transition-delay:1000ms
70536:   }
70537: }</style>
        ^
ParseError: RightParenthesis is expected
    at error (C:\dev\projects\wighawag\a17t-svelte-test\node_modules\svelte\src\compiler\utils\error.ts:25:16)
    at Parser$1.error (C:\dev\projects\wighawag\a17t-svelte-test\node_modules\svelte\src\compiler\parse\index.ts:93:3)
    at Object.read_style [as read] (C:\dev\projects\wighawag\a17t-svelte-test\node_modules\svelte\src\compiler\parse\read\style.ts:21:11)
    at tag (C:\dev\projects\wighawag\a17t-svelte-test\node_modules\svelte\src\compiler\parse\state\tag.ts:190:27)
    at new Parser$1 (C:\dev\projects\wighawag\a17t-svelte-test\node_modules\svelte\src\compiler\parse\index.ts:45:12)
    at parse (C:\dev\projects\wighawag\a17t-svelte-test\node_modules\svelte\src\compiler\parse\index.ts:208:17)
    at compile (C:\dev\projects\wighawag\a17t-svelte-test\node_modules\svelte\src\compiler\compile\index.ts:79:14)
    at C:\dev\projects\wighawag\a17t-svelte-test\node_modules\rollup-plugin-svelte\index.js:252:22
    at ModuleLoader.addModuleSource (C:\dev\projects\wighawag\a17t-svelte-test\node_modules\rollup\dist\shared\rollup.js:17742:30)
    at ModuleLoader.fetchModule (C:\dev\projects\wighawag\a17t-svelte-test\node_modules\rollup\dist\shared\rollup.js:17796:9)

This repo : https://github.com/wighawag/a17t-svelte-test reproduce the issue

@milesmcc
Copy link
Owner

The reason it doesn't get imported if you put the import after Tailwind is that @imports must be the first thing in the file.

a17t exports its CSS like any other CSS library, so this looks to me like some kind of misconfiguration in that repository with postcss-import. Feel free to reopen if you're convinced this is an a17t error.

Until then, though,I'm going to need to close this issue. I really can't help here -- I have never worked with Svelte and Rollup in-depth, so there's not much I can do. Maybe StackOverflow could help?

@wighawag
Copy link
Author

After investigating further this seems indeed to be an issue with svelte itself : sveltejs/svelte#5078

@milesmcc
Copy link
Owner

Got it. Let me know if you reach a resolution — I’d hate for Svelte users to be prevented from using a17t!

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