TypeError: this.getResolve is not a function at object.loader

(When learning the navheader component (1) of Project 5-1of MOOCs Xiaomi Mall)

Reason: There was a problem with the version of SASS installed in the early stage of the project, but it was successfully installed after the version in the video.

Note: You cannot replace only the Version of sas-Loader but not the version of Node-sass. You must replace both versions

Solution:

// Uninstall the current node-sass version NPM uninstall node-sass // Install the specified node-sass version CNPM install [email protected] --save-dev // Uninstall the current Sas-loader version NPM uninstall Sas-loader // Install the specified sas-loader version CNPM install [email protected] --save-devCopy the code

Remember: after the installation is successful, restart the project, otherwise the node error will be reported, as long as restart the project no node error.