尝试安装 sass-loader 来编译 scss,但它显示版本兼容性错误。我降级了版本,也试了很多方法,但还是有相同的问题出现
React 版本 - 17.0.2 节点版本 - 16.2.0 npm 版本 - 7.13.0
Package.json
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"antd": "^4.16.2",
"node-sass": "^4.14.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "^7.2.4",
"react-scripts": "4.0.3",
"redux-saga": "^1.1.3",
"web-vitals": "^1.0.1"
},
可以看下这个node-sass和node的对应关系,然后尝试修改下版本