Error in installing node SCSS
When building Vue scaffold or in Vue project, you want to use sass function,
npm install node-sass --save-dev
npm install sass-loader --save-dev
npm install style-loader --save-dev
After the installation is complete, an error occurred at runtime
Modele build failed: TypeError: this.getResolve is not a function at Object.loader...
This is because the current version of SASS is too high, and there is an error during the compilation of webpack. At this time, you only need to change to a lower version. Next, I’ll talk about the modification method. It’s very simple, as follows: find the package.json Just replace the version of “sass loader” in the file.
My local is replacing "sass-loader":"^8.0.0", with "sass-loader":"^7.3.1",
At this time to run the project again, it runs successfully.
You can also uninstall the current version first and then install the specified version
Uninstall the current version npm uninstall sass-loader
Install npm install [email protected] --save-dev
Similar Posts:
- Use sass and less in Vue and solve the problem of error reporting (this. Getoptions is not a function)
- NPM run dev Error: this.getOptions is not a funtion
- Mac uniapp Compile Error: sass-loader [How to Solve]
- [Solved] Error:Node Sass version 6.0.0 is incompatible with ^4.0.0
- [Solved] NPM Error: gyp verb which failed Error:not found: python2
- [Solved] Vue installs less Error: Failed to compile with 1 errors
- [Solved] Module build failed: from ./node_modules/mini-css-extract-plugin/dist/loader.js
- [Solved] Module build failed: Error: Cannot find module ‘node-sass’
- [Solved] Module build failed: Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.
- [Solved] Project compile error After Install less-loader: Typeerror: this getOptions is not a function