【Vue】Syntax Error: TypeError: Cannot set properties of undefined (setting 'XXX')
错误:
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
解决办法:
把yarn.lock、node_modules删除,然后重新执行yarn install, yarn run serve