aws-amplify@^0.1.36 undefined is not a function (near ...window.addEventListener...)
See original GitHub issueRelated Issue
Do you want to request a feature or report a bug?
- report a bug and
- request a feature
What is the current behavior?
- If do not turn on debugger
undefined is not a function (near …window.addEventListener…)
- If turn on debugger
Worked well.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn’t have dependencies other than AWS Amplify.
- npm install
npm install --save aws-amplify // This line installed "^0.1.36" in my case.
npm install --save aws-amplify-react
npm install --save aws-amplify-react-native
- import and used
import Amplify, { Auth } from "aws-amplify";
import aws_exports from "../aws-exports";
import authConfigure from "../authConfigure";
Amplify.configure(aws_exports);
Auth.configure(authConfigure);
Auth.federatedSignin()
This issue can be resolved
npm install --save aws-amplify@latest
But This issue will cause many people to confuse how to add amplify.
What is the expected behavior?
- AWS amplify should work regardless of if debugger turns on.
- This issue should be wrote in docs.
- Want to change document like this
npm install --save aws-amplify@(version that rightly work)
- Want to change document like this
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
undefined is not a function (near ...window.addEventListener...)
The error claims to be coming from within browser.js and whenever I comment out importing aws-amplify the error is gone and my app...
Read more >Javascript event listener fails because "undefined" is not a ...
$('#tagBox') returns a jQuery element which doesn't have addEventListener method which is a native method. You need to get the raw DOM ...
Read more >TypeError: addEventListener is not a function in JavaScript
The "addEventListener is not a function" error occurs for multiple reasons: calling the method on an object that is not a valid DOM...
Read more >Window.postMessage() - Web APIs | MDN
The window.postMessage() method safely enables cross-origin communication between Window objects; e.g., between a page and a pop-up that it ...
Read more >Why am I getting Error message: addEventListener is not a ...
Hello, I am adding an addEventListener function to a (video) DIV so that when people click on the Thumbnail of the Video, it...
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
May be unrelated to this problem, looks like the new @aws-amplify/predictions dependency is creating similar problems. Just install aws modules one by one to only get the one you’ll use.
I have pretty much the same problem. Debugged remotely it works well, without remote debugging, “undefined is not a function(evaluation ‘Uint32Array.from’)” is displayed. aws-amplify aws-amplify-react and aws-amplify-react-native are all up to date. I’m sure it’s from amplify since there’s AmazonAIConvertPredictionsProvider.js mentionned in the error