簡體   English   中英

aws-amplify AWSIoTProvider 不是具有 Angular 8 的構造函數

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM