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

Bug: Pre-transform error: [sass] An importer must have either canonicalize and load methods, or a findFileUrl method. #5430

Closed
5 tasks done
JoyNop opened this issue Jan 18, 2025 · 0 comments

Comments

@JoyNop
Copy link

JoyNop commented Jan 18, 2025

Version

Vben Admin V5

Describe the bug?

根据文档指引完成下面的操作

git clone https://github.com/vbenjs/vue-vben-admin.git
# 进入项目目录
cd vue-vben-admin

# 使用项目指定的pnpm版本进行依赖安装
corepack enable

# 安装依赖
pnpm install

pnpm dev

出现一下错误

Image
Image

Image

我在https://github.com/vbenjs/vue-vben-admin/issues/5170找到有类似的问题,但是并没有好的解决方案,「检查一下全局安装的sass版本是不是太高了」
请问适合5.0的sass版本是多少?,是否需要手动降级?

Reproduction

https://github.com/user-attachments/assets/bf7ec840-baa2-44d0-bb85-ae32b0d6128d

System Info

System:
    OS: macOS 15.2
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 3.11 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - /usr/local/bin/node
    npm: 10.2.3 - /usr/local/bin/npm
  Browsers:
    Chrome: 132.0.6834.83
    Edge: 131.0.2903.147
    Firefox: 134.0.1
    Safari: 18.2

Relevant log output

Select the app you need to run [dev]:
│  @vben/web-antd

> @vben/web-antd@5.5.2 dev /Users/hanrui/Documents/JoyNop/demo-app/vue-vben-admin/apps/web-antd
> pnpm vite --mode development

                                                                                                                                                                                          13:22:20
  VITE v6.0.7  ready in 4593 ms

  ➜  Local:   http://localhost:5666/                                                                                                                                                      13:22:20
  ➜  Network: http://192.168.31.66:5666/                                                                                                                                                  13:22:20
  ➜  Vben Admin Docs: https://doc.vben.pro                                                                                                                                                13:22:20
  ➜  Nitro Mock Server: http://localhost:5320/api                                                                                                                                         13:22:20
  ➜  press h + enter to show help                                                                                                                                                         13:22:20
                                                                                                                                                                                          13:22:21
✔ Nitro Mock Server started.                                                                                                                                                             13:22:21

 ERROR  13:22:25 [vite] (client) Pre-transform error: [sass] An importer must have either canonicalize and load methods, or a findFileUrl method.                                         13:22:25
  Plugin: vite:css
  File: /Users/hanrui/Documents/JoyNop/demo-app/vue-vben-admin/node_modules/.pnpm/vxe-table@4.10.0_vue@3.5.13_typescript@5.7.3_/node_modules/vxe-table/styles/cssvar.scss


 ERROR  13:22:25 [vite] (client) Pre-transform error: [sass] An importer must have either canonicalize and load methods, or a findFileUrl method.                                         13:22:25
  Plugin: vite:css
  File: /Users/hanrui/Documents/JoyNop/demo-app/vue-vben-admin/node_modules/.pnpm/vxe-pc-ui@4.3.75_vue@3.5.13_typescript@5.7.3_/node_modules/vxe-pc-ui/styles/cssvar.scss

✔ Nitro Server built in 4880 ms                                                                                                                                                    nitro 13:22:26

 ERROR  13:22:26 [vite] (client) Pre-transform error: [sass] An importer must have either canonicalize and load methods, or a findFileUrl method.                                         13:22:26
  Plugin: vite:css
  File: /Users/hanrui/Documents/JoyNop/demo-app/vue-vben-admin/packages/effects/layouts/src/basic/header/header.vue?vue&type=style&index=0&scoped=6c3f90bb&lang.scss


 ERROR  13:22:28 [vite] (client) Pre-transform error: [sass] An importer must have either canonicalize and load methods, or a findFileUrl method.                                         13:22:28
  Plugin: vite:css
  File: /Users/hanrui/Documents/JoyNop/demo-app/vue-vben-admin/packages/@core/ui-kit/shadcn-ui/src/components/select/select.vue?vue&type=style&index=0&scoped=d7182354&lang.scss


 ERROR  13:22:28 [vite] (client) Pre-transform error: [sass] An importer must have either canonicalize and load methods, or a findFileUrl method.                                         13:22:28
  Plugin: vite:css
  File: /Users/hanrui/Documents/JoyNop/demo-app/vue-vben-admin/packages/@core/ui-kit/menu-ui/src/components/normal-menu/normal-menu.vue?vue&type=style&index=0&scoped=4cf27ca1&lang.scss


 ERROR  13:22:28 [vite] (client) Pre-transform error: [sass] An importer must have either canonicalize and load methods, or a findFileUrl method.                                         13:22:28
  Plugin: vite:css
  File: /Users/hanrui/Documents/JoyNop/demo-app/vue-vben-admin/packages/@core/ui-kit/menu-ui/src/components/menu.vue?vue&type=style&index=0&lang.scss

Validations

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

1 participant