I have followed below official link document official link. It is working fine with ng serve But when I build and than visit that page it is showing error like "AWSIoTProvider is not a constructor ". I am not getting any solution for this.
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',
}));
Above issue occurred, after upgrading the "aws-amplify" from "^2.2.6" to "^3.0.8" version.
Please help me to resolve the issue.
Thanks in advance!
Same issue here but in Angular 9.1.1
Had the same issue. As a workaround, changing
import { AWSIoTProvider } from '@aws-amplify/pubsub/lib/Providers';
to
import { AWSIoTProvider } from '@aws-amplify/pubsub/lib/Providers/AWSIotProvider';
worked for me.
Had the same issue. As a workaround, changing
import { AWSIoTProvider } from '@aws-amplify/pubsub/lib/Providers';
to
import { AWSIoTProvider } from '@aws-amplify/pubsub/lib/Providers/AWSIotProvider';
worked for me.
@WolfWalter Thanks for sharing. What version of Angular you are using? Regards
I just updated to Angular 9.1.4.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.
Most helpful comment
Had the same issue. As a workaround, changing
import { AWSIoTProvider } from '@aws-amplify/pubsub/lib/Providers';to
import { AWSIoTProvider } from '@aws-amplify/pubsub/lib/Providers/AWSIotProvider';worked for me.