解决异常:Vuetify 报错 Deprecation Warning: Using / for division outside of calc() ...

2024-06-23前端1 分钟622 次阅读
AI 摘要鱼粮不足,AI 今天先歇着 · 正文在下面

异常

今天手贱把原项目的 node_modules 包给删除了,于是重新安装了遍依赖,但项目启动确报错了。

sh 复制代码
Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($grid-gutter, 3) or calc($grid-gutter / 3)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
65 │     'md': $grid-gutter / 3,
   │           ^^^^^^^^^^^^^^^^
   ╵
    node_modules/vuetify/src/styles/settings/_variables.scss 65:11     @import
    node_modules/vuetify/src/styles/settings/_index.sass 1:9           @import
    node_modules/vuetify/src/styles/styles.sass 2:9                    @import
    node_modules/vuetify/src/components/VCalendar/_variables.scss 1:9  @import
    stdin 1:9                                                          root stylesheet
image.png

于是在 github 上查找是否有类似问题的,发现确实有:https://github.com/vuetifyjs/vuetify/issues/13694

解决

修改 package.json

json 复制代码
"sass": "~1.32",

然后 npm install 即可

觉得有用就点个赞,不用登录也能读

评论

0 条
登录 之后才能评论
—
还没有评论,来说第一句