编译第三方的前端项目时候出现下面问题
ERROR Failed to compile with 1 error 22:21:36 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--11-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--11-oneOf-1-2!./node_m odules/less-loader/dist/cjs.js??ref--11-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/NumberInfo/NumberInfo.vue?vue&type=style&index=0&id=4370c5af&l ang=less&scoped=true& 4:14-486 15:3-20:5 16:22-494 @ ./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 @ ./src/components/index.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://192.168.3.2:81&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
网上有些资料说是yarn或npm版本问题,但看上面提示不是这个问题,
应该是NumberInfo.vue问题,但提示的错误Syntax Error: TypeError: Cannot set properties of undefined (setting 'parent') 有点看不懂,好像也没有什么parent的属性
要把上面的scoped去掉就正常了,
因为使用了antdv的css变量,加了scoped 导致获取不到。