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

SassError: "This variable was not declared with !default in the @used module" #464

Open
SachaG opened this issue Feb 20, 2024 · 3 comments

Comments

@SachaG
Copy link

SachaG commented Feb 20, 2024

Using pico v2.0.3 in a Next.js project via the npm package (and using pnpm), the regular version works fine but trying to use @use with the yellow theme gives me this error:

This variable was not declared with !default in the @used module
@SachaG SachaG changed the title Variant error: "This variable was not declared with !default in the @used module" @use error: "This variable was not declared with !default in the @used module" Feb 20, 2024
@SachaG SachaG changed the title @use error: "This variable was not declared with !default in the @used module" SassError: "This variable was not declared with !default in the @used module" Feb 20, 2024
@SachaG
Copy link
Author

SachaG commented Feb 20, 2024

Seems similar to sass/dart-sass#2063

@SachaG
Copy link
Author

SachaG commented Feb 20, 2024

Oh, I noticed that although @use "pico"; works, it's loading the previous version of Pico (pre-2.0). So maybe that's the root of the issue? If that variable doesn't exist in previous versions that might explain the error. But then how can I make it load the right version…?

Note: on the other hand @import "@picocss/pico/scss/pico"; does load v2…

@glaplace
Copy link

glaplace commented Mar 4, 2024

Hello,

I have same error (vuejs 3 + vitejs).

To solve it i use

@use "@picocss/pico/scss/pico" with (
  $theme-color: "grey"
);

It works but i have the same question as @SachaG .

Won't this be a problem in the future ?

Thanks.

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