Node.js Vue/节点错误:规则只能有一个资源源
我是Vue和Node的新手,我一直忙于学习一个Vue3项目,一切都进行得很顺利。我想使用scss文件,以便通过npm安装sass loader,使用:Node.js Vue/节点错误:规则只能有一个资源源,node.js,vue.js,npm,webpack,Node.js,Vue.js,Npm,Webpack,我是Vue和Node的新手,我一直忙于学习一个Vue3项目,一切都进行得很顺利。我想使用scss文件,以便通过npm安装sass loader,使用: npm install sass-loader sass webpack --save-dev 从那时起,应用程序就坏了,现在当我尝试提供服务时,我得到了以下错误: Error: Rule can only have one resource source (provided resource and test + include +
npm install sass-loader sass webpack --save-dev
从那时起,应用程序就坏了,现在当我尝试提供服务时,我得到了以下错误:
Error: Rule can only have one resource source (provided resource and test + include + exclude) in {
"exclude": [
null
],
"use": [
{
"loader": "C:\\pathtoapp\\node_modules\\cache-loader\\dist\\cjs.js",
"options": {
"cacheDirectory": "C:\\pathtoapp\\node_modules\\.cache\\babel-loader",
"cacheIdentifier": "43be597c"
},
"ident": "clonedRuleSet-38.use[0]"
},
{
"loader": "C:\\pathtoapp\\node_modules\\babel-loader\\lib\\index.js",
"options": "undefined",
"ident": "undefined"
}
]
}
Error: Rule can only have one resource source (provided resource and test + include + exclude) in {
"exclude": [
null
],
"use": [
{
"loader": "C:\\pathtoapp\\node_modules\\cache-loader\\dist\\cjs.js",
"options": {
"cacheDirectory": "C:\\pathtoapp\\node_modules\\.cache\\babel-loader",
"cacheIdentifier": "43be597c"
},
"ident": "clonedRuleSet-38.use[0]"
},
{
"loader": "C:\\pathtoapp\\node_modules\\babel-loader\\lib\\index.js",
"options": "undefined",
"ident": "undefined"
}
]
}
我查找了这个错误,大多数人认为这是webpack的问题,但我已卸载并重新安装。安装了一个早期版本的webpack,尝试将package.json更改为早期版本,尝试了我目前能在上找到的任何东西,现在我完全被难倒了
如果能在这方面提供任何帮助,我将不胜感激,因为我宁愿学习并发现如何解决问题,而不是简单地开始一个新项目。如果需要,请告知我应该在编辑中发布的任何代码/文件。我遇到了相同的问题,我能够通过以下方式解决它:
rm-射频节点\u模块
rm package-lock.json
npm安装--旧式对等DEP
您能提供完整的网页配置吗?@Seblor当然可以,我应该从哪里获取?