1.vue使用npm下载elment时出错
命令行输入 npm install element-ui@2.15.3
报警:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: test@0.1.0
npm ERR! Found: vue@3.4.24
npm ERR! node_modules/vue
npm ERR! vue@"^3.2.13" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^2.5.17" from element-ui@2.15.3
npm ERR! node_modules/element-ui
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\admin\AppData\Local\npm-cache\_logs\2024-04-22T23_42_50_383Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: C:\Users\admin\AppData\Local\npm-cache\_logs\2024-04-22T23_42_50_383Z-debug-0.log
根据报警提示咱们在后面加上–legacy-peer-deps 写成npm install element-ui@2.15.3 --legacy-peer-deps
既可
2 elemen-ui编译能通过但是网页界面是空白的
查看vue的版本 vue -V
发现是@vue/cli 5.0.8 版本很新,所以之前装的element-ui的 版本是2.15.3 需要更新版本到element-plus
步骤 1 npm uninstall element-ui
删除原先的版本
步骤2 npm install element-plus --save 安装新版本 发现也不会像上面安装一样出错了
步骤3
import ElementPlus from 'element-plus';
import 'element-plus/theme-chalk/index.css';
createApp(App).use(store).use(router).use(ElementPlus).mount('#app')
正确引入头文件
接着正常使用就ok了。
3.node前端项目运行报错:Error: error:0308010C:digital envelope routines::unsupported**
问题原因
新安装的node.js跑之前的vue项目
package.json中修改
"scripts": {
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
}
4 vscode创建前端工程化代码
在vscode中使用vue init 项目名称 或者vue create hello-world创建前端工程化目录
具体创建前端工程步骤:
步骤1:在文件系统中创建文件夹作为工程目录
步骤2:弹出控制windows窗口 输入 vue ui 创建模板工程
步骤3:打开vscode软件加入工程所在的文件夹
步骤4:修改默认端口:在vue.config.js中添加
devServer:{
port:7070
},
步骤5:调出终端窗口下载element-plus 终端输入npm install element-plus --save
步骤6:安装element加入布局和加入元素
5.jsherp vue目录结构
6.MyBatis逆向工程报错You must configure either the server or JDBC driver (via the ‘serverTimezone)
添加serverTimezone=Asia/Shanghai
connectionURL="jdbc:mysql://localhost:3306/jsh_erp?serverTimezone=Asia/Shanghai"