Author Archives: Robins

[How to Solve Vue warn]: Unknown custom element: did you register the component correctly?

Preface

Copy code
[Vue warn]: Unknown custom element:  did you register the component correctly? For recursive components, make sure to provide the "name" option.

The cause of the problem is: related components are used, but not introduced

Solutions

First find the relevant code caused the error, see if there is use similar components, such as the use radio-groupand radioassembly, but not introduced, this time above error occurs

 <el-form-item label="状态:">
      <el-radio-group v-model="formData.status">
            <el-radio :key="item.value"
            :label="item.value"
            v-for="item in statusOptions" >{{item.label}}</el-radio>
      </el-radio-group>
</el-form-item>

Found in the project directory main.js, and then import {} fromintroduced into related components, re- Vue.use()use. For example:

import {
    Radio,
    RadioGroup,
} from 'element-ui';

Vue.use(Radio);
Vue.use(RadioGroup);

This completes the global introduction of components

Mybatis Error: Cause: java.sql.SQLException: sql injection violation, syntax error: syntax error, expect EQ

1. The screenshot of error report is as follows:

2. According to the error report output, check the position after the token, which appears near the ID field. The reason is that after LZ updates the last attribute of the statement, there is an extra comma in front of the where keyword.

3. Solutions

Remove the comma in the red box in the screenshot of step 1.

Pandas Read csv Error tokenizing data. C error: Expected 18 fields in line 173315, saw 20

 Error tokenizing data. C error: Expected 18 fields in line 173315, saw 20

The content of this line is

b55421db8f2f7f9610e7dfc08bcc76e5	Sales consultant listed company with high salary and high commission - 719 \N 1 10000 5000 20190314 20190413 0 -1 null College \N \N Job duties: 1. independent and high quality to complete the reception of visiting customers, to introduce courses and related services, and lead to registration; 2. patient, detailed answers to customer questions of the consultation 3.Explore the potential needs of customers and make accurate recommendations for the courses; 4.Work with the team to complete sales tasks according to the sales target set by the company; 5.Work with other departments to complete the work. Requirements: 1. Good customer service consciousness, good self-motivation; 2. Strong learning ability, active and positive, team spirit; 3. Quick thinking, fast reaction, standard Mandarin; 4. Sales experience is preferred. Benefits: 1. perfect social insurance (five insurance and one gold); 3. position promotion���� clear: course consultant - reserve principal - principal - regional director; 4. training: professional vocational skills training + personalized career promotion guidance; 5. open office environment of the Internet company. ☆ This is a team belonging to young people, this is the platform for you to play, this is your wonderful! Looking forward to growing with you!

Pandas can’t parse
although this line of data can be changed to the correct form after processing, there are 4000 + lines of data with different problems.

Using error_ bad_ Lines = false to solve the problem and ignore the disordered lines

NPM start project error: cannot find module ‘webpack’ problem solution

First install cnpm and then use cnpm i to install the package when stuck and then force to end the download and then install node_modules again after the error error, start the project when npm run serve reported the following error.
The correct approach: If you force to interrupt the download, you should remove the node_modules and reinstall them, no error after the end of the installation means success
PS D:\code\DA_svn\pages\index> npm run serve
> [email protected] serve D:\code\DA_svn\pages\index
vue-cli-service serve
INFO  Starting development server…
ERROR  Error: Cannot find module ‘webpack’
Require stack:
– D:\code\DA_svn\pages\index\node_modules\[email protected]@webpack-dev-server\lib\Server.js
– D:\code\DA_svn\pages\index\node_modules\_@[email protected]@@vue\cli-service\lib\commands\serve.js
– D:\code\DA_svn\pages\index\node_modules\_@[email protected]@@vue\cli-service\lib\Service.js
– D:\code\DA_svn\pages\index\node_modules\_@[email protected]@@vue\cli-service\bin\vue-cli-service.js
Error: Cannot find module ‘webpack’
Require stack:
– D:\code\DA_svn\pages\index\node_modules\[email protected]@webpack-dev-server\lib\Server.js
– D:\code\DA_svn\pages\index\node_modules\_@[email protected]@@vue\cli-service\lib\commands\serve.js
– D:\code\DA_svn\pages\index\node_modules\_@[email protected]@@vue\cli-service\lib\Service.js
– D:\code\DA_svn\pages\index\node_modules\_@[email protected]@@vue\cli-service\bin\vue-cli-service.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:849:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\pactera\AppData\Roaming\npm-cache\_logs\2021-03-09T00_59_46_004Z-debug.log

[Solved] #command-line-arguments .\main.go:5:4: no new variables on left side of :=

# command-line-arguments
.\main.go:5:4: no new variables on left side of :=
package main
import “fmt”
func main(){
var b int;
b := 1;
fmt.Println(b);
}

The correct way to write it: remove the : or add a new variable
package main
import “fmt”
func main(){
var b int;
b,a := 1,2;
fmt.Println(b,a);
}
// No compile error is generated at this point because a new variable is declared, because := is a declaration statement

 

Go declares that the local variable does not use command line arguments. Main. Go: 4:6: a declared but not used

Declaring global variables that are not used does not report errors
# command-line-arguments
.\main.go:4:6: a declared but not used
package main
import “fmt”
func main(){
var a string=”hhh”;
var b,c int =1,2
fmt.Println(b,c);
}
Correct writing style:
package main
import “fmt”
func main(){
// var a string=”hhh”;
var b,c int =1,2
fmt.Println(b,c);
}

Error starting vue project these dependencies were not found:create in ./src/router/modules/md.js

Error starting vue project
These dependencies were not found:
* @/views/md/TemplateSetting/create in ./src/router/modules/md.js
* @/views/md/TemplateSetting/index in ./src/router/modules/md.js
To install them, you can run: npm install –save @/views/md/TemplateSetting/create @/views/md/TemplateSetting/index

This is because the create page of the vue project is defined in md.js but the create.vue page is missing so it reports an error

 

Docker run Error: container_linux.go:235: starting container process caused “process_linux.go:258: appl

Error message:
container_ linux.go:235: starting container process caused “process_ linux.go:258: applying cgroup configuration for process caused “Cannot set property TasksAccounting, or unknown property.””
/usr/bin/docker-current: Error response from daemon: oci runtime error: container_ linux.go:235: starting container process caused “process_ linux.go:258: applying cgroup configuration for process caused “Cannot set property TasksAccounting, or unknown prop
After the system is rebooted, the docker cannot be started. After the docker is reloaded, the startup container will report an error, as shown above

reason:

The docker version is not compatible with the operating system version. Upgrade the docker version
I use Yum to install docker. By default, I can only pull to a lower version, so I downloaded RPM docker from the Internet.