jeecgboot / JeecgBoot

🔥「企业级低代码平台」前后端分离架构SpringBoot 2.x/3.x,SpringCloud,Ant Design&Vue3,Mybatis,Shiro,JWT。强大的代码生成器让前后端代码一键生成,无需写任何代码! 引领新的开发模式,引入AI模型能力 OnlineCoding->代码生成->手工MERGE,帮助Java项目解决70%重复工作,让开发更关注业务,既能快速提高效率,帮助公司节省成本,同时又不失灵活性。
http://www.jeecg.com
Apache License 2.0
40.87k stars 14.88k forks source link

✘ [ERROR] Could not resolve "Vue" #6510

Closed kavencat closed 1 year ago

kavencat commented 1 year ago
版本号:

jeecgboot-vue3@3.5.3

问题描述:

✘ [ERROR] Could not resolve "Vue"

node_modules/.pnpm/@qiaoqiaoyun+drag-free@1.1.3_@aesoper+normal-utils@0.1.5_@interactjs+core@1.10.18_@interactjs_dlfodwp3kuqlaikzkckspnuuju/node_modules/@qiaoqiaoyun/drag-free/lib/index.umd.min.js:1:1276:
  1 │ ...,require("lodash-es"),require("Vue"),require("@ant-design/icons-...
    ╵                                  ~~~~~

You can mark the path "Vue" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.

✘ [ERROR] Could not resolve "CodeMirror"

node_modules/.pnpm/@qiaoqiaoyun+drag-free@1.1.3_@aesoper+normal-utils@0.1.5_@interactjs+core@1.10.18_@interactjs_dlfodwp3kuqlaikzkckspnuuju/node_modules/@qiaoqiaoyun/drag-free/lib/index.umd.min.js:1:1532:
  1 │ ...array.reduce.js"),require("CodeMirror"),require("axios"),require...
    ╵                              ~~~~~~~~~~~~

You can mark the path "CodeMirror" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.

截图&代码:

image

友情提示(为了提高issue处理效率):

zhangdaiscott commented 1 year ago

你是怎么安装的?

kavencat commented 1 year ago

按图配置报错没有,不过首页打不开

zhangdaiscott commented 1 year ago

截图说明

kavencat commented 1 year ago

image image image

zhangdaiscott commented 1 year ago

F12 错误

kavencat commented 1 year ago

registerGlobComp.ts:63 Uncaught SyntaxError: The requested module '/nodemodules/.pnpm/registry.npmmirror.com+@qiaoqiaoyun+drag-free@1.1.3@aesoper+normal-utils@0.1.5_@interactjs+c_bo5pgsbikblhey22xqzi7ki5xq/node_modules/@qiaoqiaoyun/drag-free/lib/index.umd.min.js?v=84e57086' does not provide an export named 'default' (at registerGlobComp.ts:63:8)

kavencat commented 1 year ago

image

zhangdaiscott commented 1 year ago

你是下载的完整最新代码吗

kavencat commented 1 year ago

是的

zhangdaiscott commented 1 year ago

把依赖删了,重新install看看

kavencat commented 1 year ago

/usr/local/bin/pnpm run reinstall

jeecgboot-vue3@3.5.3 reinstall /home/linuxlite/www/jeecgboot-vue3 rimraf pnpm-lock.yaml && rimraf yarn.lock && rimraf package.lock.json && rimraf node_modules && pnpm i

Progress: resolved 137, reused 137, downloaded 0, added 0  WARN  deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.  WARN  deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility  WARN  deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead  WARN  deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.  WARN  deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated  WARN  deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated  WARN  deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated  WARN  deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated  WARN  deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.  WARN  deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser Packages: +1813 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Progress: resolved 1853, reused 1811, downloaded 0, added 1813, done

dependencies:

devDependencies:

 WARN  Issues with peer dependencies found . ├─┬ stylelint-config-prettier 9.0.5 │ └── ✕ unmet peer stylelint@">= 11.x < 15": found 15.10.3 └─┬ @qiaoqiaoyun/drag-free 1.1.3 └─┬ vue3-colorpicker 2.2.2 └── ✕ unmet peer @vueuse/core@^10.1.2: found 6.9.2 in @qiaoqiaoyun/drag-free

Done in 5m 16.6s

进程已结束,退出代码为 0

kavencat commented 1 year ago

同样的错误

kavencat commented 1 year ago

image

zhangdaiscott commented 1 year ago

不太清楚,你可以先把仪表盘删了

kavencat commented 1 year ago

删了后整个无法运行

zhangdaiscott commented 1 year ago

注释掉仪表盘,需要修改三个地方 修改src/components/registerGlobComp.ts

1、引入 image 2、富文本注册注释 image

3、仪表盘注册注释 image

kavencat commented 1 year ago

注释掉后 image

zhangdaiscott commented 1 year ago

你还改了别的代码?这是online的

kavencat commented 1 year ago

好像是第一个位置多注了一行

kavencat commented 1 year ago

这个问题有找到原因没

zhangdaiscott commented 1 year ago

我们本地没有问题,群里其他人也没有反馈类似问题的

zhangdaiscott commented 1 year ago

你通过这个地址下载代码试试,看看是不是下载代码有问题 https://gitee.com/jeecg/jeecgboot-vue3

kavencat commented 1 year ago

是@qiaoqiaoyun/drag-free引起的

kavencat commented 1 year ago

我认为有可能是大小写造成

kavencat commented 1 year ago

image

是由到小写造成;

image

这个问题就不是很清楚了

zhangdaiscott commented 1 year ago

升级到这个版本试试

  "@qiaoqiaoyun/drag-free": "^1.1.4",