我做了一个常规的npm从4.0安装到5.0,但这种情况一直发生-错误TS1086:不能在环境上下文中声明访问器。
35设置disabled(val: boolean);../node_modules/@nebular/theme/components/accordion/accordion.component.d.ts:71:9 -错误TS1086:不能在环境上下文中声明访问器。
71 get multi():boolean;~ ../node_modules/@nebular/theme/components/accordion/accordion.component.d.ts:72:9 - error TS1086:不能在环境上下文中声明访问器。
72 set multi(val: boolean);~ ../node_modules/@nebular/theme/components/actions/actions.component.d.ts:39:9 -错误TS1086:不能在环境上下文中声明访问器。
39 get disabled():布尔值;../node_modules/@nebular/theme/components/actions/actions.component.d.ts:40:9 -错误TS1086:不能在环境上下文中声明访问器。
40设置为禁用(值:布尔值);../node_modules/@nebular/theme/components/actions/actions.component.d.ts:139:9 -错误TS1086:不能在环境上下文中声明访问器。等等……
发布于 2020-06-10 19:44:58
我在构建angular项目时也遇到了同样的错误。然而,我的场景是我使用Angular 8创建了我的项目,并使用:
ng add @nebular/theme
显然,它不会运行,因为我不小心安装了最新版本的5.0.0。因此,它所做的是,它将我的@angular/cdk包从8.0.0替换到了9.0.0,这最终打破了所有的依赖。
为了解决这个问题,我恢复了所有的更改,并安装了解决此问题的nebular 4.6.0:
ng add @nebular/theme@4.6.0
https://stackoverflow.com/questions/61191961
复制相似问题