本文介绍: 1.关于安装了vue3中element–ui的安装已经改为npm install —save element–plus了,就需要导入对应的css样式,引入了element–plus的样式报错。–save–dev时报错,并且在node_modules文件中没有找到。解决办法就是使用如下命令安装此版本的router。4.安装npm install。
1.关于安装了vue3中element–ui的安装已经改为npm install —save element–plus了,就需要导入对应的css样式,引入了element–plus的样式报错
import 'element-plus/theme-chalk/index.css'
2.关于在安装 npm i element–ui -S 报错对应信息怎么解决:
npm i element-ui -S
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: vue@3.2.47
npm ERR! node_modules/vue
npm ERR! peer vue@"3.2.47" from @vue/server-renderer@3.2.47
npm ERR! node_modules/@vue/server-renderer
npm ERR! @vue/server-renderer@"3.2.47" from vue@3.2.47
npm ERR! peer vue@"^3.2.0" from vue-router@4.1.6
npm ERR! node_modules/vue-router
npm ERR! vue-router@"^4.1.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! element-ui@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vue@2.7.14
npm ERR! node_modules/vue
npm ERR! peer vue@"^2.5.17" from element-ui@2.15.13
npm ERR! node_modules/element-ui
npm ERR! element-ui@"*" from the root project
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! See /Users/naitang/.npm/eresolve-report.txt for a full report.
就是因为安装element-ui出现的版本冲突问题,使用如下命令就可以解决此问题:
npm i element-ui -S -legacy-peer-deps
3.安装cnpm install sass–loader —save–dev 成功啦,但是在运行时出错了,说明是sass的版本过高,这个时候你需要,重新安装一下sass,当然需要把之前的sass删除掉,具体操作如下:
卸载 npm uninstall sass-loader
安装 npm install sass-loader@7.3.1 --save-dev
如果在运行还报错,把lang=”sass“去掉也就是如下图:
4.安装npm install vue–router —save–dev时报错,并且在node_modules文件中没有找到
ERR! this command with --force, or --Tegacy-peer-deps
ERR!to accept an incorrect (and potentially broken) dependency resolution
ERR!
ERR!See C;Usersgwx13AppDataLocalnpm-cacheleresolve-report.txt for a full report.
ERR!A complete log of this run can be found in:
ERR!
ERR !While resolving: vue-project-first@1.0.0
ERR!
Found: vue@2.6.14
ERR!node modules vue
ERR !
vue@"^2.5.2" from the root project
ERR!
ERR!Could not resolve dependency:
ERR!
peer vue@"^3.2.0" from vue-router@4.0.13
pm
om
ERR!node modules/vue-router
ERR!
dev vue-router@"*" from the root project
npm install --legacy-peer-deps vue-router@3.5.2
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: demo-vue@1.0.0
npm ERR! Found: vue@2.7.14
npm ERR! node_modules/vue
npm ERR! vue@"^2.5.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^3.2.0" from vuex@4.1.0
npm ERR! node_modules/vuex
npm ERR! vuex@"*" from the root project
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!
Z-debug.log
PS F:vuedemo-vue> npm i vuex --legacy-peer-deps
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'nopt@6.0.0',
npm WARN EBADENGINE required: { node: '^12.13.0 || ^14.15.0 || >=16.0.0' },
npm WARN EBADENGINE current: { node: 'v15.8.0', npm: '7.5.1' }
npm WARN EBADENGINE }
npm i vuex@3
但是您需要注意你在使用vue版本,需要安装您所需要的vuex版本
希望您学习愉快
原文地址:https://blog.csdn.net/weixin_61189391/article/details/129388664
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_30660.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。