Questions tagged «sass-loader»

2
错误:Node Sass版本5.0.0与^ 4.0.0不兼容
我已经npx create-react-app在npm v7.0.7和Node v15.0.1上使用命令创建了空白的React项目 已安装: React v17.0.1, node-sass v5.0.0, 然后,我尝试将空白.scss文件导入到App组件中: App.js import './App.scss' function App() { return ( <div className="App"> App </div> ); } export default App; 引发错误: Failed to compile. ./src/App.scss (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--5-oneOf-6-3!./node_modules/s ass-loader/dist/cjs.js??ref--5-oneOf-6-4!./src/App.scss) Error: Node Sass version 5.0.0 is incompatible with ^4.0.0. package.json { "name": "react-17-node-sass-5", "version": "0.1.0", "private": …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.