Vue’s weird Cannot add property _Ctor, object is not extensible error

Original link: https://chegva.com/5539.html

Recently, I found a visual form generator that supports antdv ( v-form-antd ), and I want to simplify the workload of each form typesetting, attribute, and verification configuration. However, the cost of using this thing is relatively high, and the form will not be displayed directly when it is installed. After debugging and checking, there is actually metadata and so on. It’s really weird:

image.png

Ask the author for consultation, the suggestion is to reduce the vue version (2.7.18 → 2.6.11), and try ant-design-vue (1.7.8 → 1.7.2), but it is useless, and the following errors have been reported:

image.png

After checking online, this error seems to be related to lazy loading of components: Cannot add property _Ctor, object is not extensible . Attempts to deal with it have no effect either. Thinking about whether there is a conflict between the plugins or something, and then banning the plugins, it is impossible to call back and forth. Finally, a whole new scaffold was installed, and the result can be displayed normally, which is really annoying! It feels that it has a lot to do with caching, and plug-in conflicts are hard to say. Finally , delete all the node_modules directories, and the plugin versions can be displayed after reinstalling all the plugin versions . It’s really difficult. In the end, it’s okay to use it. There are a lot of small problems. It’s not cheap to be lazy. j_0025.gif .

image.png

refer to:

This article is reprinted from: https://chegva.com/5539.html
This site is for inclusion only, and the copyright belongs to the original author.