编译第三方前端项目时候出现Syntax Error: TypeError: Cannot set properties of undefined (setting ‘parent‘)

简介: 编译第三方前端项目时候出现Syntax Error: TypeError: Cannot set properties of undefined (setting ‘parent‘)

编译第三方的前端项目时候出现下面问题

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 导致获取不到。

相关文章
|
2月前
|
存储 API Windows
MASM32连接程序时error A2006: undefined symbol : u
MASM32连接程序时error A2006: undefined symbol : u
|
3月前
|
存储 JavaScript 前端开发
成功解决:Cannot read properties of undefined (reading ‘commit‘)
这篇文章提供了解决Vuex中"Cannot read properties of undefined (reading 'commit')"错误的两种方法:检查模板中的数据属性是否存在,以及确保在Vue实例中正确挂载了store对象。
成功解决:Cannot read properties of undefined (reading ‘commit‘)
TypeError: Cannot set properties of undefined (setting ‘resdata‘),res定义数据出现的问题,定义的方法用this换成that
TypeError: Cannot set properties of undefined (setting ‘resdata‘),res定义数据出现的问题,定义的方法用this换成that
Cannot read properties of undefined (reading ‘row‘)
Cannot read properties of undefined (reading ‘row‘)
Cannot read properties of undefined (reading ‘post‘)
Cannot read properties of undefined (reading ‘post‘)
|
4月前
|
JavaScript
element-ui Cannot read properties of undefined (reading ‘name‘),data中写成集合的形式
element-ui Cannot read properties of undefined (reading ‘name‘),data中写成集合的形式
|
4月前
|
JavaScript
Cannot read properties of undefined (reading ‘$router‘)
Cannot read properties of undefined (reading ‘$router‘)
Cannot read properties of undefined (reading ‘username‘),粗心惹的祸,数据都不知道写呢了,
Cannot read properties of undefined (reading ‘username‘),粗心惹的祸,数据都不知道写呢了,
|
4月前
|
JavaScript 前端开发
报错:Cannot read properties of undefined (reading ‘$message‘)解决方法
以上就是解决"Cannot read properties of undefined (reading ‘$message‘)"错误的几种方法,希望对你有所帮助。
2929 0
Cannot read properties of undefined (reading ‘use‘)-------编程版本问题
Cannot read properties of undefined (reading ‘use‘)-------编程版本问题

热门文章

最新文章

下一篇
无影云桌面