scss
npm install node-sass --save-dev //安装node-sass
npm install sass-loader --save-dev //安装sass-loader
npm install style-loader --save-dev //安装style-loader
出现以下问题可能是版本错误
Modele build failed: TypeError: this.getResolve is not a function at Object.loader...
处理方法
将 "sass-loader": "^8.0.0",更换成了 "sass-loader": "^7.3.1"
package.json中查找替换
npm install
npm run dev
Sass报Error: ENOENT: no such file or directory, scandir '**/node_modules/node-sass/vendor'
先安装完node-sass看看行不行, 不行的话, 执行:
npm rebuild node-sass
不行的,再运行:
npm update
npm install
node node_modules/node-sass/scripts/install.js
npm rebuild node-sass
npm rebuild gulp-sass
网友评论