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

As of Dart Sass 2.0.0, !global assignments won't be able to declare new variables. Recommendation: add $E: null $B: null at the stylesheet root. #2430

Open
harshi9959 opened this issue Nov 7, 2024 · 5 comments

Comments

@harshi9959
Copy link

harshi9959 commented Nov 7, 2024

Previously I was encountering Legacy JS API deprecation warnings but after resolving those am getting the warnings like below

Deprecation Warning: As of Dart Sass 2.0.0, !global assignments won't be able to declare new variables.

Recommendation: add `$B: null` at the stylesheet root.

   ╷
59 │   $B: $namespace + $common-separator + $block !global;
   │   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules/element-plus/theme-chalk/src/mixins/mixins.scss 59:3  b()
    node_modules/element-plus/theme-chalk/src/icon.scss 24:1           @use
    node_modules/element-plus/theme-chalk/src/base.scss 3:1            @use
    node_modules/element-plus/theme-chalk/src/index.scss 1:1           @use
    assets/scss/element/index.scss 3:1                                 root stylesheet

Deprecation Warning: As of Dart Sass 2.0.0, !global assignments won't be able to declare new variables.

Recommendation: add `$E: null` at the stylesheet root.

   ╷
67 │   $E: $element !global;
   │   ^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules/element-plus/theme-chalk/src/mixins/mixins.scss 67:3  e()
    node_modules/element-plus/theme-chalk/src/alert.scss 63:3          @content
    node_modules/element-plus/theme-chalk/src/mixins/mixins.scss 62:5  b()
    node_modules/element-plus/theme-chalk/src/alert.scss 5:1           @use
    node_modules/element-plus/theme-chalk/src/index.scss 4:1           @use
    assets/scss/element/index.scss 3:1                                 root stylesheet
@nex3
Copy link
Contributor

nex3 commented Nov 7, 2024

I'm not sure what the question here is. The deprecation warning already explains what the issue is and recommends a solution.

@nex3 nex3 added the needs info label Nov 7, 2024
@harshi9959
Copy link
Author

But when am trying that solution am still not able to correct the warning

@harshi9959
Copy link
Author

"devDependencies": {
"@element-plus/icons-vue": "^2.3.1",
"@fingerprintjs/fingerprintjs": "^4.4.3",
"@nuxt-alt/auth": "3.1.7",
"@nuxt-alt/http": "^1.7.10",
"@nuxt/devtools": "^1.3.9",
"@pinia/nuxt": "^0.5.2",
"@types/node": "^22.1.0",
"@vueuse/core": "^10.11.0",
"@vueuse/nuxt": "^10.11.0",
"detect-gpu": "^5.0.42",
"detectincognitojs": "^1.3.5",
"element-plus": "2.8.7",
"js-file-download": "^0.4.12",
"nuxt": "3.12.4",
"sass": "^1.80.6",
"vue-tsc": "^2.0.29",
"xlsx": "^0.18.5"
}

above are my dependencies

@nex3
Copy link
Contributor

nex3 commented Nov 12, 2024

But when am trying that solution am still not able to correct the warning

This isn't enough information for me to help you. Can you provide a minimal reproduction that you expect to work and is not?

@TSnowRock
Copy link

我也遇到了同样的问题,在 Nuxt 推荐的 @element-plus/nuxt 安装后,添加 sass 就抛出异常

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

No branches or pull requests

3 participants