gpt4 book ai didi

angular - Twilio 聊天模块错误 TS1086 无法在环境上下文中声明访问器

转载 作者:行者123 更新时间:2023-12-04 10:55:11 32 4
gpt4 key购买 nike

我有一个版本控制的 Angular 项目。它在 Windows 机器上运行良好。
但是,当我将更改拉到我的 Ubuntu 19 机器上时,我总是收到一个 twillio 聊天模块错误:


ERROR in node_modules/twilio-chat/lib/channel.d.ts(122,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/channel.d.ts(123,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/channel.d.ts(124,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/channel.d.ts(125,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/channel.d.ts(126,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/channel.d.ts(127,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/channel.d.ts(128,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/channel.d.ts(129,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/channel.d.ts(130,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/channel.d.ts(131,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/channel.d.ts(132,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/channel.d.ts(133,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/client.d.ts(130,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/client.d.ts(131,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/client.d.ts(132,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/configuration.d.ts(13,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/configuration.d.ts(14,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/configuration.d.ts(15,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/configuration.d.ts(16,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/configuration.d.ts(17,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/configuration.d.ts(18,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/media.d.ts(23,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/media.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/media.d.ts(25,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/media.d.ts(26,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/member.d.ts(53,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/member.d.ts(54,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/member.d.ts(55,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/member.d.ts(56,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/member.d.ts(57,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/member.d.ts(58,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/member.d.ts(59,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/member.d.ts(60,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/member.d.ts(61,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/member.d.ts(62,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/message.d.ts(48,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/message.d.ts(49,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/message.d.ts(50,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/message.d.ts(51,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/message.d.ts(52,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/message.d.ts(53,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/message.d.ts(54,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/message.d.ts(55,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/message.d.ts(56,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/message.d.ts(57,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/message.d.ts(58,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/restpaginator.d.ts(12,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/restpaginator.d.ts(13,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/restpaginator.d.ts(14,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/services/typingindicator.d.ts(21,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/session.d.ts(30,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/session.d.ts(31,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/user.d.ts(50,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/user.d.ts(51,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/user.d.ts(52,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/user.d.ts(53,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/user.d.ts(54,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/user.d.ts(55,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/user.d.ts(56,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/user.d.ts(57,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/twilio-chat/lib/util/deferred.d.ts(7,9): error TS1086: An accessor cannot be declared in an ambient context.




我试图删除 node_module 文件夹并使用 npm install但它保持不变

我还将 angular cli 的版本从 7 升级到 8,但没有运气

最佳答案

看起来你需要在你的 Ubuntu 机器上将你的 typescript 版本升级到 3.7。来自 typescript 3.7 release notes :

To detect the issue around accessors, TypeScript 3.7 will now emit get/set accessors in .d.ts files so that in TypeScript can check for overridden accessors. so presumably sequelize was compiled with typescript 3.7 and emits definition files that previous versions don't understand. So you'll need to upgrade to typescript 3.7 or use an earlier version of sequelize.

关于angular - Twilio 聊天模块错误 TS1086 无法在环境上下文中声明访问器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59250573/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com