bazelbuild / rules_nodejs

NodeJS toolchain for Bazel.

Home Page:https://bazelbuild.github.io/rules_nodejs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue introduces Element-Plus to report error

liushuai05 opened this issue · comments

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

image

Hope to get help from veterans.
Thank you very much.

It appears as if you're using https://github.com/aspect-build/rules_js, this repo is primarily only the nodejs toolchain which doesn't seem related to your issue.

My first guess would be a missing dependency declaration in your BUILDs, but I'd need more info such as a repo demonstrating the issue. If you can create a repo to reproduce the issue please open an issue at https://github.com/aspect-build/rules_js