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.

Uncaught TypeError: Cannot read property 'firstChild' of undefined

See original GitHub issue

Using your demo markup from CodePen and your scripts installed via Bower I am getting the following error

Uncaught TypeError: Cannot read property 'firstChild' of undefined. on line 66 of photoswipe.js

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
sellmarkcommented, Aug 4, 2017

Moving initiating <script> after .pswp solved that problem for me.

5reactions
syed-harooncommented, Sep 10, 2016

@fkamlesh The solution is if you are referring codePen example then, do not forget to add the HTML that’s defined from line# 69 to 133 (i.e. EOF)

Read more comments on GitHub >

github_iconTop Results From Across the Web

html - javascript Uncaught TypeError: Cannot read property ...
This error means the elem object is null . Check the fld value passed and see whether an object with that id actually...
Read more >
TypeError: Cannot read property 'firstChild' of Null in JS
The "Cannot read property 'firstChild' of null" error occurs when trying to access the firstChild property on a null value. Variables that store...
Read more >
TypeError: Cannot read property 'firstChild' of undefined #487
I encounter the following error when initializing a GmapMap from 'vue2-google-maps/dist/components/map' inside Vue app: Uncaught (in ...
Read more >
Cannot read property 'firstChild' of null after upgrading to ...
If commentReplyTitleId does not exist, r will be null , hence different than undefined , so it tries to get the firstChild ....
Read more >
Cannot read property 'firstChild' of undefined - Jenkins Jira
Hello,. We have a problem to access to configure page of a job because of a js exception : Uncaught TypeError: Cannot read...
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