[Bug]: Vue introduces Element-Plus to report error
liushuai05 opened this issue · 0 comments
liushuai05 commented
What happened?
When I adopted the time of introducing element-plus in the sample vue folder, I encountered the following error:
VITE v3.2.8 ready in 1887 ms
➜ Local: http://127.0.0.1:5173/
➜ Network: use --host to expose
✘ [ERROR] Could not resolve "@vue/shared"
../../../../node_modules/.aspect_rules_js/element-plus@2.5.6_vue_3.2.45/node_modules/element-plus/es/components/autocomplete/src/autocomplete.mjs:1:41:
1 │ import { NOOP, isString, isObject } from '@vue/shared';
╵ ~~~~~~~~~~~~~
You can mark the path "@vue/shared" as external to exclude it from
the bundle, which will remove this error.
✘ [ERROR] Could not resolve "@vue/shared"
../../../../node_modules/.aspect_rules_js/element-plus@2.5.6_vue_3.2.45/node_modules/element-plus/es/components/calendar/src/calendar.mjs:3:32:
3 │ import { isArray, isDate } from '@vue/shared';
╵ ~~~~~~~~~~~~~
You can mark the path "@vue/shared" as external to exclude it from
the bundle, which will remove this error.
✘ [ERROR] Could not resolve "@vue/shared"
../../../../node_modules/.aspect_rules_js/element-plus@2.5.6_vue_3.2.45/node_modules/element-plus/es/components/input/src/input.mjs:1:25:
1 │ import { isString } from '@vue/shared';
╵ ~~~~~~~~~~~~~
You can mark the path "@vue/shared" as external to exclude it from
the bundle, which will remove this error.
......
The details of log are as follows:
txt.log
i used pnpm i@vue /shared --workspace-root and yarn add@vue /shared neither worked and added the package to BUILD.bazel in the vue folder as well
Hope to get help from veterans.
Thank you very much.
Version
Development (host) and target OS/architectures: manjaro 21
Output of bazel --version
: 7.0.1
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
or MODULE.bazel
file:
Language(s) and/or frameworks involved: vue
How to reproduce
Here are reproducible examples:
https://github.com/liushuai05/bazel_examples/tree/main/frontend/vue
Any other information?
No response