Author Archives: Robins

[Solved] Vue Error: Syntax Error: TypeError: Cannot set properties of undefined (setting ‘XXX’)

Error Messages:

69% building 4279/4311 modules 32 active ...\jeecg-boot-v3.1.0\ant-design-vue-jeecg\node_modules\ant-design-vue\es\vc-tabs\src\TabPane.js[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

[@vue/compiler-sfc] the >>> and /deep/ combinators have been deprecated. Use :deep() instead.

98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 error                                                                                         下午9:48:08
 error  in ./src/components/NumberInfo/NumberInfo.vue?vue&type=style&index=0&id=4370c5af&lang=less&scoped=true&

Syntax Error: TypeError: Cannot set properties of undefined (setting 'parent')


 @ ./node_modules/vue-style-loader??ref--10-oneOf-1-0!./node_modules/css-loader??ref--10-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--10-oneOf-1-2!./node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/NumberInfo/NumberInfo.vue?vue&type=style&index=0&id=4370c5af&lang=less&scoped=true& 4:14-483 15:3-20:5 16:22-491
 @ ./src/components/NumberInfo/NumberInfo.vue?vue&type=style&index=0&id=4370c5af&lang=less&scoped=true&
 @ ./src/components/NumberInfo/NumberInfo.vue
 @ ./src/components/NumberInfo/index.js
 @ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Home.vue?vue&type=script&lang=js&
 @ ./src/views/Home.vue?vue&type=script&lang=js&
 @ ./src/views/Home.vue
 @ ./src/config/router.config.js
 @ ./src/router/index.js
 @ ./src/utils/request.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://192.168.49.133:3000/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

 

Solution:

Delete yarn.lock, node_modules, and re-execute yarn install, yarn run serve

[Solved] selenium Error: ERROR:ssl_client_socket_impl.cc(962)] handshake failed; returned -1, SSL

Solution:
This error occurs due to an unsafe address error, a loop error is reported, and the program is terminated. With a –ignore-certificate-errors parameter, those certificate errors are ignored, as follows:

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--ignore-certificate-errors')
driver = webdriver.Chrome(options=chrome_options)

 

[Solved] error TS2584: Cannot find name ‘console’. Do you need to change your target library? Try changing the ‘lib’ compiler option to include ‘dom’.

When running a ts file using ts-node in the terminal, I get an error.

bug to reproduce

Solution

// Install the runtime library of the TypeScript helper, including all TypeScript helper functions 
npm install -D tslib @types/node  

reason

console is not part of the EcmaScript standard. The console in the DOM is in the browser environment and belongs to the browser BOM API. The console in Node is an API in Node.js, which is defined by nodejs itself. Although the two have the same function, they are not the same thing.

[Solved] Error in load assembly ‘System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1’

You can add the following statement to App.config

Just add it directly under the configuration node. 

This will allow you to use the latest 5.0.0.0 version.

<runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
       <dependentAssembly> 
          <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" 
                            publicKeyToken="b03f5f7f11d50a3a" 
                            culture="neutral" /> 
          <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" 
                           newVersion="5.0.0.0"/> 
       </dependentAssembly> 
    </assemblyBinding> 
 </runtime>

[Solved] Error: Django is not importable in this environment

1. Question: It shows that there is no django module > download one, and prompts that it has been installed > prompts that the django module cannot be imported after startup

 

 

2. Solutions:

Looking at the interpreter of the project found that it is python37

The default pip is the python36 pip added to the environment variable

So you need to add the pip path of the python37 interpreter to the environment variable, after restarting Pycharm

Install django with pip3.7 install django==xxx.

Spring Connect Redis Error: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: MOVED 12910 172.16.4.99:6379

Record a redis switching accident in the
production environment. The redis switching in the production environment was changed from the original direct connection ip service to Ali’s redis cluster, and there was an error of link failure. The
org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: MOVED 12910 172.16.4.99:6379
reason is that the spring configuration method of the cluster is different from that of the
stand-alone machine. The connection method of the stand-alone machine

spring: 
  redis:
    host: 127.0.0.1
    port: 6379
    password: 123
    database: 0

Cluster configuration

spring: 
  redis:
    cluster:
      nodes: safasafdsasdasas.dsad.asf.aliyuncs.com:6379
    password: dsafdfaasdf
    database: 0

[Vue warn]: Error in callback for watcher “fileList”: “TypeError: Cannot create property ‘uid’ on string

The reason for the error:
TypeError: Cannot create property ‘xxx’ on string ‘xxxx’, this type of error is the type of assignment error ,
such as the above example error, when using the upload component of ElementUI, the string list is assigned to fileList, but fileList, What is required is a list of objects
Example error code:

pictureList = ['url1', 'url2'];
this.fileList = pictureList;

Example correct code:

pictureList = ['url1', 'url2'];
this.fileList = pictureList.map(item => {
       return {
         name: item,
         url: item
       }
});

Build the graph With the gmapping algorithm error: ERROR: cannot launch node of type [gmapping/slam_gmapping]: gmapping

1. Preface

Mobile trolley running gmapping algorithm to build a map

Gmapping is a SLAM algorithm based on 2D lidar that uses RBPF (Rao-Blackwellized Particle Filters) algorithm to complete the construction of two-dimensional grid maps.

Advantages: gmapping can build indoor environment maps in real time, with less calculation in small scenes, and high map accuracy, and low requirements for lidar scanning frequency.

Disadvantages: As the environment increases, the amount of memory and computation required to build the map will become huge, so gmapping is not suitable for large scene composition.

wiki address of gmapping in ROS


2. Errors and reasons

When the mobile car does the gmapping algorithm SLAM, it starts to report an error, and the prompt is as follows:

insert image description here

Reason"

After re-flashing Jetpack3.3 for the Jetson TX2 development board, the system does not have the ROS package of gmapping and move_base

3. Solution

Install the appropriate package:

ROS package for gmapping:

sudo apt install ros-kinetic-gmapping

insert image description here
ROS package of move_base:

sudo apt install ros-kinetic-move-base

insert image description here

Run it again and it’s successful~


4. Summary

For this kind of error, just install the corresponding ROS package according to the prompts

[Solved] Helm install Error: Error: no available release name found

Helm reported this error Error: no available release name found

 

Reason: Presumably because tiller does not have the correct role permissions.

Solution:

execute the command

[root@k8s-master01 helm]# kubectl create serviceaccount --namespace kube-system tiller

[root@k8s-master01 helm]# kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller

[root@k8s-master01 helm]#  kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'

[Solved] Error response from daemon: driver failed programming external connectivity on endpoint mysql

Error response from daemon: driver failed programming external connectivity on endpoint mysql (0b3324391f54cd0137ff7a9da6ed145656b187dfb984d507ca62252a54d47245): (iptables failed: iptables –wait -t nat -A DOCKER -p tcp -d 0/0 –dport 3306 -j DNAT –to- destination 172.17.0.2:3306 ! -i docker0: iptables: No chain/target/match by that name.

 

Error reproduction: After starting mysql, close the firewall, and then restart mysql (docker restart mysql), the above error occurs.

Reason: After we start Docker, we operate the firewall firewalld, and the above error will occur

Solution: restart docker (systemctl restart docker), restart docker service and regenerate custom chain DOCKER

Why can it be solved:

The custom chain DOCKER defined when the docker service starts, when the centos7 firewall is cleared,

The bottom layer of firewall is to use iptables for data filtering, which is built on top of iptables, which may conflict with Docker.

firewalld Rules that will be removed from iptables  when  starting or restarting DOCKER , thus affecting the normal working of Docker.

When you are using Systemd, it  firewalld will start before Docker, but if you operate after Docker has started  firewalld , you will need to restart the Docker process.

[Solved] CUDA initialization: Unexpected error from cudaGetDeviceCount()

I recently used the rented server, and suddenly the torch cannot be used normally, and it prompts CUDA initialization: Unexpected error from cudaGetDeviceCount() error, as shown in the following figure

 

After several setbacks, the cause of the problem was found to be:

Because the nvidia-fabricmanager package has been updated for some reason, such as being updated during automatic system update or apt-get update, apt-get upgrade, etc. And this package must be consistent with the driver version before it can be used normally, because A100-80G is the nvswitch version, and this package can be installed to support nviswitch before it can be used normally.

My default nvidia-fabricmanager version is 510.47.03 and the driver version 510.47.03. As a result, the package version has been updated, resulting in a mismatch, so it cannot be used normally.

 

Solution:

Reinstall the corresponding compatible version of this package nvidia-fabricmanager (for example, I need to install version 510.47.03 here), and then disable automatic updates. In addition, to ensure that this service runs normally nvidia-fabricmanager, you can set it to start automatically at boot.

The installation and setup operations are as follows:

wget https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64/nvidia-fabricmanager-510_510.47.03-1_amd64.deb
apt-get remove nvidia-fabricmanager-510
apt-get install ./nvidia-fabricmanager-510_510.47.03-1_amd64.deb
systemctl enable nvidia-fabricmanager
systemctl restart nvidia-fabricmanager
systemctl status nvidia-fabricmanager

 

The result is as follows:  

 

Lessons learned : When using the A100-80G server, it is not necessary to use apt-get updates or turn on Ubuntu system updates.