It needs to be used in the project recently sass, install sass-loader An error occurred after :
INFO Starting development server...
ERROR Error: Rule can only have one resource source (provided resource and
test + include + exclude) in {
"exclude": [
null
],
"use": [
{
"loader":
"D:\\zenos\\study-vue1\\node_modules\\cache-loader\\dist\\cjs.js",
"options": {
"cacheDirectory":
"D:\\zenos\\study-vue1\\node_modules\\.cache\\babel-loader",
"cacheIdentifier": "55e5131a"
},
"ident": "clonedRuleSet-38[0].rules[0].use[0]"
},
{
"loader":
"D:\\zenos\\study-vue1\\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":
"D:\\zenos\\study-vue1\\node_modules\\cache-loader\\dist\\cjs.js",
"options": {
"cacheDirectory":
"D:\\zenos\\study-vue1\\node_modules\\.cache\\babel-loader",
"cacheIdentifier": "55e5131a"
},
"ident": "clonedRuleSet-38[0].rules[0].use[0]"
},
{
"loader":
"D:\\zenos\\study-vue1\\node_modules\\babel-loader\\lib\\index.js",
"options": "undefined",
"ident": "undefined"
}
]
}
The possible reason is the default sass perhaps webpack The version is too high , This leads to incompatibility , Uninstall the previous higher version , Just install the lower version
Uninstall the current version sass-loader command :npm uninstall sass-loader
Install a lower version of sass-loader command :npm install [email protected] --save-dev
( Installation required node-sass In my words :npm install node-sass --save)
If not :
Uninstall the current version webpack command :npm uninstall webpack
Install a lower version of webpack command :npm install webpack@^4.0.0 --save-dev
Technology