-
Notifications
You must be signed in to change notification settings - Fork 273
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
Bad Error message when trying to use props values as Css values #1412
Comments
I don't think the |
OK good point, but the error message is still wrong, the configuration is right, the preview works so there's no at runtime (styles are already loaded to the component). the problem relies with assingning variables to style(), witch the dev should not be doing. I just think the error message is not helping the dev debugging the problem |
I can't reproduce your error with the reproduction you've provided. Even when I did add the VE and vercel integrations correctly, I managed to deploy the app just fine. If you could create a repo with a minimal example of the error, or at least provide steps on reproducing the error in a simple qwik app, that would be appreciated. |
Of course, I'll work on that, and get back to you in few days, sorry for the delay if that's a problem |
npm create qwik@latest basic ./project; cd ./project ; npm install; npm run qwik add vercel-edge; (Press Enter); npm run qwik add styled-vanilla-extract; (Press Enter); npm install --legacy-peer-deps; mkdir src/components/buggy-component; touch src/components/buggy-component.tsx; echo 'import { component$ } from "@builder.io/qwik"; export default component$(() => { I think now its reproducible |
You can't use I'm guessing that vercel is detecting some VE dependencies as runtime dependencies due to your use of Again, I don't think this is an issue that VE can help with, since your usage of the library is incorrect, and we can't easily influence how vercel chooses to surface this error. |
fine man, thanks for you time |
Describe the bug
i know i can't use dynamic values as CSS values when using vanilla-extract , but the error message displayed is not helpful.
Description:
Cause:
A div component with class ={ style({ backgroundColor: props.value.toString() }) }
Suggested Error Message:
vanilla-extract-css -- dynamic values are not allowed in this context -- $file_name:$file_line
Reproduction
npm create qwik; npm run qwik add vanilla-extract-css; npm run qwik add vercel-adapter ; npm run build; npm run deploy
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: