vue-element-admin install error
vue-element-admin install error
# 安装 nodejs
dnf module reset nodejs
dnf module install nodejs:16
npm install -g pnpm
vi ~/.npmrc
粘贴以下3行
registry=http://registry.npmmirror.com/
auto-install-peers=true
strict-peer-dependencies=false
以下来自 github issue
git clone https://github.com/PanJiaChen/vue-element-admin.git
- 克隆以后 删除package.json中tui-editor:1.3.3
- src/components/MarkdownEditor/index.vue文件,将全部import换成下面几个
import 'codemirror/lib/codemirror.css'
import '@toast-ui/editor/dist/toastui-editor.css'
import Editor from '@toast-ui/vue-editor'
import defaultOptions from './default-options'
并将该文件下的getValue和setValue分别换成getMarkdown和setMarkdown
sed -i 's/getValue/getMarkdown/g' src/components/MarkdownEditor/index.vue
sed -i 's/setValue/setMarkdown/g' src/components/MarkdownEditor/index.vue
- 单独安装tui-editor
pnpm install --save @toast-ui/vue-editor
- 安装其他依赖
pnpm install
根据报错可能还需要安装
pnpm install -- save @toast-ui/editor
pnpm install --save svg-baker-runtime
npm run dev
附上 git diff
# git diff package.json
diff --git a/package.json b/package.json
index 02f68e2..17718d2 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,8 @@
"test:ci": "npm run lint && npm run test:unit"
},
"dependencies": {
+ "@toast-ui/editor": "^3.2.1",
+ "@toast-ui/vue-editor": "^3.2.0",
"axios": "0.18.1",
"clipboard": "2.0.4",
"codemirror": "5.45.0",
@@ -31,10 +33,11 @@
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
+ "regenerator-runtime": "^0.13.10",
"screenfull": "4.2.0",
"script-loader": "0.7.2",
"sortablejs": "1.8.4",
- "tui-editor": "1.3.3",
+ "svg-baker-runtime": "^1.4.7",
"vue": "2.6.10",
"vue-count-to": "1.0.13",
"vue-router": "3.0.2",
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律