This problem occurs when the less writing style is used in Vue. The reason for this problem is that the less-loader module is not installed, or the installed version is incompatible with the version of webpack. Therefore, an error occurs when using it, and the project cannot be started normally.
First check the webpack version: npm view webpack versions
View less-loader versions: npm view less-loader versions
Select your own corresponding less-loader version to install, I randomly choose the 10 version here: npm i less-loader@10
If the installation is unsuccessful, uninstall it, and then choose another version to install: npm uninstall less-loader
Comments
Post a Comment