Tag Archives: Error in data(): “TypeError”

[antd vue Update] Some Components Error: Error in data(): “TypeError” & Cannot read properties of undefined (reading ‘pageSize’)

As mentioned, due to the previous upgrade of the antd vue framework, and the vue version has not been upgraded, a series of error issues have been reported

1. Cannot read properties of undefined (reading’pageSize’)
2. Error in data(): “TypeError”
3. Cannot set properties of undefined (setting’selectedRowKeys’)

Looking at the code, there is no problem with the corresponding parameter configuration, but the
best solution is to upgrade the matching dependency.

ant-design – vue 1.7.4 must use vue@^2.6.0 version, so you can upgrade vue, I personally test and upgrade the latest version @ 2.6.14

Specific steps:

1. Delete package-lock.json first, so that the installation dependencies can take effect
. 2. Manually find the corresponding vue and vue-template-compiler in node_modules to prevent incomplete updates. The latter depends on the former, and the version number must be consistent@ 2.6.14
3. Modify the version of vue and vue-template-compiler in package.json to @2.6.14, and save it
. 4. Run npm install to update and upgrade dependencies. After
updating, you can run npm run dev to debug and develop