question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

aws-amplify AWSIoTProvider is not a constructor with Angular 8

See original GitHub issue

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!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

3reactions
WolfWaltercommented, May 4, 2020

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.

0reactions
github-actions[bot]commented, Jun 11, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found