aws-amplify AWSIoTProvider is not a constructor with Angular 8
See original GitHub issueI 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!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7
Top Results From Across the Web
aws-amplify AWSIoTProvider is not a constructor with Angular 8
It is working fine with ng serve But when I build and than visit that page it is showing error like "AWSIoTProvider is...
Read more >How to use AWS Amplify and Angular to Build Cloud Enabled ...
To use AmplifyService with dependency injection, inject it into the constructor of any component or service, anywhere in your application.
Read more >Adding the map component using the AWS services to an ...
In this article, an application will be created using the latest version of Angular and added to the MapLibre map library with Amazon...
Read more >amplify-js
AWS Amplify provides a declarative and easy-to-use interface across different categories of cloud operations. AWS Amplify goes well with any JavaScript based ...
Read more >How to set up #aws #iot #pubsub using #AwsAmplify sdk?
If you are using aws Amplify library (I use 0.4.8 at the moment) in an Angular project and trying to use PubSub module...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Had the same issue. As a workaround, changing
import { AWSIoTProvider } from '@aws-amplify/pubsub/lib/Providers';
toimport { AWSIoTProvider } from '@aws-amplify/pubsub/lib/Providers/AWSIotProvider';
worked for me.This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels or Discussions for those types of questions.