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

配置locale="zhCN"后build报错 #3307

Closed
1 task
BG7ZAG opened this issue Sep 20, 2024 · 1 comment
Closed
1 task

配置locale="zhCN"后build报错 #3307

BG7ZAG opened this issue Sep 20, 2024 · 1 comment

Comments

@BG7ZAG
Copy link

BG7ZAG commented Sep 20, 2024

Basic Info

  • Package Name And Version: @arco-design/[email protected]
  • Framework version: vue ^3.5.6
  • Browser: chrome128.0.0.0

Steps to reproduce

在win下面是成功build的,但是在阿里云效的流水线中build失败。

流水线的构建机的系统:Linux/Amd64,node版本:20.17.0,使用npm和pnpm都一样报错

报错信息:

Rollup failed to resolve import "@arco-design/web-vue/es/locale/lang/zh-CN" from "/root/workspace/qsl-services-web_Bnpx/src/App.vue?vue&type=script&setup=true&lang.ts".
[16:54:03] This is most likely unintended because it can break your application at runtime.
[16:54:03] If you do want to externalize this module explicitly add it to
[16:54:03] `build.rollupOptions.external`

当上面报错后,在vite.config.ts中加入以下代码后又报错:

build: {
      rollupOptions: {
        external: ["@arco-design/web-vue"]
      }
    }

报错信息:

src/App.vue(2,18): error TS2307: Cannot find module '@arco-design/web-vue/es/locale/lang/zh-CN' or its corresponding type declarations.

@BG7ZAG
Copy link
Author

BG7ZAG commented Sep 23, 2024

啊,我的错,大小写敏感了,应该是:@arco-design/web-vue/es/locale/lang/zh-cn

@BG7ZAG BG7ZAG closed this as completed Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant