![](/img/trans.png)
[英]Amplify "npm install --save aws-amplify @aws-amplify/ui-angular" breaks the code
[英]aws-amplify AWSIoTProvider is not a constructor with Angular 8
我遵循了以下官方链接文档官方链接。 它与ng serve一起工作正常但是当我构建并访问该页面时它显示错误,如“AWSIoTProvider 不是构造函数” 。 我没有得到任何解决方案。
import { AWSIoTProvider } from '@aws-amplify/pubsub/lib/Providers';
Amplify.addPluggable(new AWSIoTProvider({
aws_pubsub_region: '<YOUR-IOT-REGION>',
aws_pubsub_endpoint: 'wss://xxxxxxxxxxxxx.iot.<YOUR-IOT-REGION>.amazonaws.com/mqtt',
}));
我对“aws-amplify”有同样的问题:“^3.0.8”,我已经降级到“aws-amplify”:“^2.2.6”,这对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.