Module build failed: TypeError: this.getResolve is not a function at Object.loader node-sass Install Error

 

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: