After writing the project structure, it shows that sass-loader is not installed after entering npm run serve
At this time, if you install sass-loader without installing node-sass, you will always report an error
The correct way is
The first step is to install node-sass
npm i node-sass
The second step is to install sass-loader
npm i sass-loader
rerun
npm run serve
reference
node: "v18.12.1"
node-sass: "^8.0.0"
sass-loader: "^13.2.1"