- 此问题在此处已有答案**:
Node Sass version 6.0.0 is incompatible with ^4.0.0 || ^5.0.0 in React.js(7个答案)
去年关闭了。
我安装NPM包,启动NPM后,我收到node sass
错误,如下所示:
- 引发错误:**
ERROR in ./node_modules/slick-carousel/slick/slick.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./node_modules/slick-carousel/slick/slick.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.
at getRenderFuncFromSassImpl (D:\Templets\angular ecommerce side\embryoangularadmin\embryoangularadmin\Embryo-Main\embryo1\embryo\node_modules\sass-loader\lib\loader.js:108:19)
at Object.sassLoader (D:\Templets\angular ecommerce side\embryoangularadmin\embryoangularadmin\Embryo-Main\embryo1\embryo\node_modules\sass-loader\lib\loader.js:46:20)
ERROR in ./node_modules/slick-carousel/slick/slick-theme.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./node_modules/slick-carousel/slick/slick-theme.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.
at getRenderFuncFromSassImpl (D:\Templets\angular ecommerce side\embryoangularadmin\embryoangularadmin\Embryo-Main\embryo1\embryo\node_modules\sass-loader\lib\loader.js:108:19)
at Object.sassLoader (D:\Templets\angular ecommerce side\embryoangularadmin\embryoangularadmin\Embryo-Main\embryo1\embryo\node_modules\sass-loader\lib\loader.js:46:20)
ERROR in ./src/assets/scss/style.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/assets/scss/style.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.
at getRenderFuncFromSassImpl (D:\Templets\angular ecommerce side\embryoangularadmin\embryoangularadmin\Embryo-Main\embryo1\embryo\node_modules\sass-loader\lib\loader.js:108:19)
at Object.sassLoader (D:\Templets\angular ecommerce side\embryoangularadmin\embryoangularadmin\Embryo-Main\embryo1\embryo\node_modules\sass-loader\lib\loader.js:46:20)
3条答案
按热度按时间5fjcxozz1#
这只是版本与节点不匹配。
要安装工作的node-sass版本,可以使用
根据您正在使用的节点版本,根据下表选择您的版本号,您可以通过
node --version
检查这对我很有效
rkkpypqq2#
npm =〉
带Yarn=〉
npm卸载节点sass
npm安装节点sass@4.14.1
这对我很有效
kulphzqa3#
使用以下代码
这对我很有效