[Bug] Houdini-preprocess errors on postcss-syntax
See original GitHub issueIf I’m installing houdini along with postcss and f.e. postcss-nesting, houdini-preprocess errors on “invalid css” as postcss doesn’t seem to be running beforehand. If I remove houdini from the preprocess-chain, everything works as intended.
> svelte-check
====================================
Loading svelte-check in workspace: /Users/bb/Work/houdini-postcss
Getting Svelte diagnostics...
Preprocessing failed
CompileError [ParseError]: Identifier is expected
at error (file:///Users/bb/Work/houdini-postcss/node_modules/.pnpm/houdini-common@0.10.1_graphql@15.5.0/node_modules/houdini-common/build/esm/index.js:15797:19)
at Parser$1$1.error (file:///Users/bb/Work/houdini-postcss/node_modules/.pnpm/houdini-common@0.10.1_graphql@15.5.0/node_modules/houdini-common/build/esm/index.js:15873:9)
at Object.read_style [as read] (file:///Users/bb/Work/houdini-postcss/node_modules/.pnpm/houdini-common@0.10.1_graphql@15.5.0/node_modules/houdini-common/build/esm/index.js:12262:20)
at tag (file:///Users/bb/Work/houdini-postcss/node_modules/.pnpm/houdini-common@0.10.1_graphql@15.5.0/node_modules/houdini-common/build/esm/index.js:14932:33)
at new Parser$1$1 (file:///Users/bb/Work/houdini-postcss/node_modules/.pnpm/houdini-common@0.10.1_graphql@15.5.0/node_modules/houdini-common/build/esm/index.js:15832:21)
at parse$3 (file:///Users/bb/Work/houdini-postcss/node_modules/.pnpm/houdini-common@0.10.1_graphql@15.5.0/node_modules/houdini-common/build/esm/index.js:15964:20)
at file:///Users/bb/Work/houdini-postcss/node_modules/.pnpm/houdini-common@0.10.1_graphql@15.5.0/node_modules/houdini-common/build/esm/index.js:31346:30
at step (file:///Users/bb/Work/houdini-postcss/node_modules/.pnpm/houdini-common@0.10.1_graphql@15.5.0/node_modules/houdini-common/build/esm/index.js:66:23)
at Object.next (file:///Users/bb/Work/houdini-postcss/node_modules/.pnpm/houdini-common@0.10.1_graphql@15.5.0/node_modules/houdini-common/build/esm/index.js:47:53)
at fulfilled (file:///Users/bb/Work/houdini-postcss/node_modules/.pnpm/houdini-common@0.10.1_graphql@15.5.0/node_modules/houdini-common/build/esm/index.js:37:58) {
code: 'css-syntax-error',
start: { line: 6, column: 9, character: 162 },
end: { line: 6, column: 9, character: 162 },
pos: 162,
filename: undefined,
frame: '4: <style lang="postcss">\n' +
'5: p {\n' +
'6: & a {\n' +
' ^\n' +
'7: color: lime;\n' +
'8: }'
}
/Users/bb/Work/houdini-postcss/src/routes/index.svelte:1:1
Warn: Identifier is expected (svelte)
<h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
The same error occurs when running the dev-server.
Minimal Repro: https://github.com/benbender/houdini-postcss-repro
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top Results From Across the Web
PostCSS configuration was not passed or is invalid · Issue #470
Describe the bug I have an issue when I'd like to use the tailwind @apply syntax within a Svelte template: It works without...
Read more >Postcss Syntax Errors silently - Stack Overflow
I've added postcss-reporter, postcss-devtools and even tried to see if there is any rules in stylelint that might show the error, but nothing....
Read more >The Dark Side of Polyfilling CSS - Philip Walton
In the article I argue that Houdini APIs will (among other things) make it possible to polyfill CSS features in a way that...
Read more >509: Use Next-gen CSS Today (Post CSS Configs) - Syntax.fm
Cut your time on error resolution from hours to minutes. It works with any language and integrates with dozens of other services. Syntax...
Read more >Instant LESS CSS Preprocessor How-to by Alex Libby - Ebook
This book takes the How-to series approach to help you learn most important tasks through recipes This book is ideal for those new...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should be fixed in version
0.10.5
. If someone could confirm, that would be awesome!Hey yall! Sorry you’re running into this. I’ll try to get a fix out for this over the weekend if someone doesn’t get to it first. Here is where the parse file is defined. Since houdini doesn’t really care about the actual contents of the style block, I suspect the best way to approach this is to do a similar preprocessing that strips the actual content away before running the parser.
I’m really curious how this just popped up, the file responsible for parsing hasn’t been touched since June 30 🤔