嗯哼大冤种 2025-04-24 15:20 采纳率: 100%
浏览 13
已结题

vue删除scss语法就可以正常运行,但是样式没有了,如果不删除就一直报错,如何解决?

vue删除scss语法就可以正常运行,但是样式没有了,如果不删除就一直报错

报错代码


```css
PS E:\下载\smartclass-frontend-main> npm run dev

> letterlearn@1.0.0 dev
> rsbuild dev --open

  Rsbuild v1.2.11

  ➜ Network:  http://10.221.172.215:3000/
  ➜ Network:  http://192.168.137.1:3000/
  ➜ Local:    http://localhost:3000/
  ➜ press h + enter to show shortcuts

start   Building...
[@vue/compiler-sfc] `defineProps` is a compiler macro and no longer needs to be imported.

[@vue/compiler-sfc] `defineEmits` is a compiler macro and no longer needs to be imported.

error   Compile error: 
Failed to compile, check the errors for troubleshooting.
File: E:\下载\smartclass-frontend-main\src\views\chat\Dialog.vue?vue&type=style&index=0&id=227a8c55&lang=scss&scoped=true:1:1
  × Module parse failed:
  ╰─▶   × JavaScript parsing error: Expression expected
         ╭─[1:0]
       1 │ .chat-panel {
         · ─
       2 │   background: #eff0f6;
       3 │   height: 100vh;
         ╰────

  help:
        File was processed with these loaders:
         * E:\下载\smartclass-frontend-main\node_modules\sass-loader\dist\cjs.js??clonedRuleSet-22.use[0]
         * E:\下载\smartclass-frontend-main\node_modules\vue-loader\dist\index.js??ruleSet[0].use[0]
        You may need an additional loader to handle the result of these loaders.

 @ ./src/views/chat/Dialog.vue.scss?vue&type=style&index=0&id=227a8c55&lang=scss&scoped=true!=!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/views/chat/Dialog.vue?vue&type=style&index=0&id=227a8c55&lang=scss&scoped=true
 @ ./src/views/chat/Dialog.vue
 @ ./src/router/index.ts
 @ ./src/main.ts


img

  • 写回答

5条回答 默认 最新

  • 本堃不方 2025-04-24 16:30
    关注

    img


    这个不是有报错信息吗?这个文件下的这个地方

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

问题事件

  • 系统已结题 5月2日
  • 已采纳回答 4月24日
  • 创建了问题 4月24日