Uncaught TypeError: Cannot set property 'AOS' of undefined
See original GitHub issueGetting an error when trying to install AOS. Console leads me to line 8 which is the first function in the aos.js file.
!function (e, t) { "object" == (typeof exports === "undefined" ? "undefined" : _typeof(exports)) && "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == (typeof exports === "undefined" ? "undefined" : _typeof(exports)) ? exports.AOS = t() : e.AOS = t(); }
am using the JS in the dist/ folder from the master branch. Not sure what else I am doing wrong. Please advise.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
aos.js:122 Uncaught TypeError: Cannot read property ...
I Just started using AOS, seeing error in chrome console. aos.js:122 Uncaught TypeError: Cannot read property 'setAttribute' of null.
Read more >michalsnik/aos - Gitter
Chrome dev tools says, there is an error in the aos.js on line 122. It says: Uncaught TypeError: Cannot read property 'setAttribute' of...
Read more >How To Fix 'Uncaught TypeError: Cannot set properties of null'
Join Discord https://selftaught-dev.com/join-discord//r/SelfTaughtDev - https://www.reddit.com/r/selftaughtdevGet My Resume Template Free ...
Read more >Uncaught TypeError Cannot set property 'nTf' of undefined ...
i get error like this : " Uncaught TypeError Cannot set property 'nTf' of undefined " when trying to add footer - datatables....
Read more >TypeError: Cannot read property 'setAttribute' of Null in JS
To solve the "Cannot read property 'setAttribute' of null" error, make sure the id you use to get the DOM element is valid....
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 Free
Top 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
Any update on this? I’m getting the same error.
Error:
undefined is not an object (evaluating 'e.AOS=t()')I’m using gulp to concat my files and minify them. Everything works well when importing the CSS and js scripts via CDN. Below are the CDN scripts I’m using.
https://unpkg.com/aos@next/dist/aos.js https://unpkg.com/aos@2.3.3/dist/aos.css
I can’t have external dependencies and wanted to simply copy and paste the CSS and js code from the script tags and place the code in their own local js and CSS files; however, I can’t get rid of the error above. The issue is occurring on Safari, Firefox, and Chrome.
what is the resolution of this? I’ve experiencing the same issue. I’ve concat’ the dist file with my script file and aos appears before my code.