Category Archives: How to Fix

Using webpack to report typeerror: this.getresolve is not a function

##Using webpack to report typeerror: this.getresolve is not a function

###Error reason: the webpack version is too low or the loader version is too high

this is the original configuration version

##Solutions:
1. Upgrade the version of webpack to the highest version (there are many changes in the version of webpack, so I’m afraid it won’t catch up with others, So you can choose not to change the webpack version)
2. Reduce the version of the loader
(1) manually reduce the downloaded version of the loader in package.json

(2) download the loader you just used again

and then run it again

TypeError: this.getOptions is not a function

Yesterday, when less replaced sass, it reported this error after installing node sass and sass loader

In short, there is a version conflict. The version of SASS loader is too high. I installed 11 and the last project was 10, so the solution is very simple

Solution:  
1.npm uninstall sass-loader       or       yarn remove sass-loader
2.npm install [email protected] -D     or       yarn add [email protected] -D

PS: my node sass version is 5.0.0, both of which are in the package     npm   i xx -D   , I came according to the last project. Different people have different opinions on the details. Just report no mistakes

 
Link to the original text: https://blog.csdn.net/qq_ 42430948/article/details/113552673

Template execution failed: ReferenceError: htmlWebpackPlugin is not defined

“38382;” 39064;”22914;” 26631;”39064;

index.html< link rel=”icon” href=”<%=%20htmlWebpackPlugin.options.url%>%20favicon.ico”> gt; lt;/ link>

25442?

< script src=<%= BASE URL%>/ tinymce4.7.5/tinymce.min.js> lt;/ script>

< script src=<%= BASE URL%>/ tinymce4.7.5/along/zhu CN.js> lt;/ script>

“26242;” 19981;”20160;”

 

 

 

No qualifying bean of type ‘javax.sql.DataSource‘ available: expected at least 1

The startup class has been configured

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})

The error information is as follows:

 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through field 'dataSource'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.sql.DataSource' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
 Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.sql.DataSource' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

Reason: the default datasource is used.
solution: start the accumulation configuration

  @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})

Get connection timeout retry: 1 MySQL errorcode 0, state 08s01 docker container accessing MySQL container is very slow and sometimes interrupted

Today, I encountered a problem: starting the Tomcat container and then accessing the MySQL container, the query speed is very slow, and sometimes it is the same as disconnecting
solution: when starting the Tomcat container, do not add the host name and MAC address, it is likely that there is a conflict

Add and addmodelerror in modelstate

ModelState ModelState1 = new ModelState();
modelstate1. Errors. Add (“cannot be empty”);

//Add a property that does not exist in the key of modelstate
modelstate. Add (“123”, modelstate1);

//Add an error to the property

Modelstate. Addmodelerror (“123”, cannot be empty “);

When SSM + Maven project is running, it is prompted that org.springframework.web.servlet.dispatcherserservlet cannot be found

When SSM + Maven project is running, it is prompted that org.springframework.web.servlet.dispatcherserservlet cannot be found

When running SSM project today, an error is reported:
HTTP status 500 – error identifying servlet class org. Springframework. Web. Servlet. Dispatcherservlet
java. Lang. classnotfoundexception: org. Springframework. Web. Servlet. Dispatcherservlet

You can confirm that org. Springframework. Web. Servlet. Dispatcherservlet exists and Maven is imported normally

Problem solving method:
select item – & gt; Right click Properties – & gt; Select deployment asset – & gt; Select Add – & gt; Select Java build path entries – & gt; Next-> Select Maven dependencies – & gt; Finish-> Apply-> OK

It can solve the problem

————————————————
Link to the original text: https://blog.csdn.net/cd19930508/article/details/80256595