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.
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
I'm not sure what the question here is. The deprecation warning already explains what the issue is and recommends a solution.
But when am trying that solution am still not able to correct the warning
"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
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?
我也遇到了同样的问题,在 Nuxt 推荐的 @element-plus/nuxt 安装后,添加 sass 就抛出异常