Problem description
Sometimes getOptions is not a funtion error occurs when vuE-cli2. x is used for project development.
Cause analysis,
This problem is mostly due to the version being too high, as shown in the figure
It can be seen here that the error is generated by htMl-loader, and the version is too high to be compatible with getOptions method. At this time, IT is necessary to downgrade htML-Loader from 2.1.2 I originally installed to 0.5.5 (the version to be installed can be viewed in package.json of the project).
The solution
The NPM method for downloading lower versions is NPM install name @version number
NPM unintall –save-dev html-loader uninstalls the higher version of html-loader
NPM install [email protected] –save-dev