从官网 https://github.com/PanJiaChen/vue-element-admin 下载的版本带有 tui-editor

版本1.3.3 ,在编译时会遇到如下问题:

error An unexpected error occurred: "https://github.com/sohee-lee7/Squire.git/info/refs?service=git-upload-pack: connect ETIMEDOUT 20.205.243.166:443".
info If you think this is a bug, please open a bug report with the information provided in "F:\\ep-clouds-II\\J2PaaS_client\\J2PaaS-TFC-pc_local\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads https://github.com/nhn/raphael.git
Directory: F:\ep-clouds-II\J2PaaS_client\J2PaaS-TFC-pc_local
Output:
fatal: unable to access 'https://github.com/nhn/raphael.git/': OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
    at ProcessTermError.ExtendableBuiltin (D:\soft\nodejs\node_global\node_modules\yarn\lib\cli.js:721:66)
    at ProcessTermError.MessageError (D:\soft\nodejs\node_global\node_modules\yarn\lib\cli.js:750:123)
    at new ProcessTermError (D:\soft\nodejs\node_global\node_modules\yarn\lib\cli.js:790:113)
    at ChildProcess.<anonymous> (D:\soft\nodejs\node_global\node_modules\yarn\lib\cli.js:25783:17)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1048:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)

解决的办法是 去除package.json 的 tui-editor 配置项

运行 npm install

在手动安装 tui-editor 即可

然后运行 :npm install --save tui-editor

若是这个方法行不通,可以使用如下解决但是有前提

如果手动安装还是不行,或者不需要这个markdown编辑器,那么去路由里把这个路由注释掉也可以。位于vue-element-admin\src\router\modules\components.js,大概21行:

{
      path: 'markdown',
      component: () => import('@/views/components-demo/markdown'),
      name: 'MarkdownDemo',
      meta: { title: 'Markdown' }
    },

转载:https://blog.csdn.net/m0_37588079/article/details/122354362

Logo

前往低代码交流专区

更多推荐