How To Fix 'Uncaught TypeError: Cannot read properties of undefined' - JavaScript Debugging

preview_player
Показать описание


Contact Me----------

Music--------
Do you make music and want to let me use it on the channel? Shoot me an email so we can talk!

In this video we talk about how to solve a common JavaScript bug. "Uncaught Typerror: Cannot set properties of null (reading 'innerHTML')". Made by Garrett Hughes

#selftaughtdev #GarrettHughes
Рекомендации по теме
Комментарии
Автор

Thank you. Seriously, I was trying to figure out this problem, and a glance at the code on your screen showed me exactly what I was doing wrong.

jessicawailes
Автор

This video just solved my entire life, thanks man! great explanation

leoable
Автор

What a great help 👍 keep up the good work

Kushal
Автор

Pls can you do a video on how to solve the issue of "cannot read properties of undefined (reading comments)"

Codewith_kachi
Автор

Thank you Bro, Your video helped me a lot to remember how to use JavaScript. Thanks a lot man. Please upload more videos with this kind of tips.

TheTalisman
Автор

Uncaught TypeError: Cannot read properties of undefined (reading 'length') and i have error in this please tell
<InfiniteScroll
dataLength={articles.length}
next={fetchMoreData}
hasMore={articles.length !== totalResults}
loader={<Spinner/>}
>
error in datalength line

shubhamaggarwal
Автор

Sir I'm getting error while using react bootsrap's form tag as "Uncaught TypeError: Cannot read properties of undefined (reading 'Group')" why this error despite there is nothing wrong with the code?

tejasukalkar
Автор

How do you change the color of a certain array (i.e.: [0], [1], [2], etc.)? I tried to use style.color = "insert color here", but I'm getting that error in the browser...

friedasimonetta
Автор

I have problem on manipulation in insertBefore, it's not undefined, but the structure has corrected...can u suggest me to fix this problem ?

herikurniawan
Автор

Was stuck with an issue. Your video helped. Thank you man.

shriyamparashar
Автор

Morning man, thanks for this video! Help me understand the when we need to use "?" on my code.

thiagobarcelos
Автор

Uncaught TypeError: Cannot read properties of undefined (reading 'filter')

can you please help me to fix this.

samiarahman
Автор

Thankyou bro that was so helpful for me

mehdi
Автор

PLEASE HELP

App.js:20
TypeError: Cannot read properties of undefined (reading 'params')

import React, {Component} from "react";

export default class Room extends Component {
constructor(props) {
super(props);
this.state = {
votes_to_skip: 2,
guest_can_pause: false,
isHost: false,
};
this.roomCode =
this.getRoomDetails();
}

getRoomDetails() {
fetch("/api/get-room" + "?code=" + this.roomCode)
.then((response) => response.json())
.then((data) => {
this.setState({
votes_to_skip: data.votes_to_skip,
guest_can_pause: data.guest_can_pause,
isHost: data.is_host,
});
});
}

render() {
return (
<div>
<h3>{this.roomCode}</h3>
<p>Votes:
<p>Guest Can Pause:
<p>Host:
</div>
);
}
}

chandrashekharsahu
Автор

hi i got the same issue could not solve it for past couple of days. here is my code for "Place order "button
const PlaceOrderScreen = {
after_render: async () => {

.addEventListener('click', async () => {

const order = convertCartToOrder();

showLoading();
const data = await createOrder(order);

hideLoading();
if (data.error)
{
showMessage(data.error);
} else {
cleanCart();
console.log(data);
document.location.hash =`/order/${data.order._id}`;

}
});

},

i am getting type error message when i am using it basically says the _id doesnt exist, while using console.log(data) i can see that _id exists. please help

baidar
Автор

Pff right now am trying to fix the same, i'm not a web developer but i thought that the problem were in the data that is getting in the fetch.

crashphantom
Автор

Type error can not read properties of undefined (reading 'message')

chembetikarunakar
Автор

Uncaught TypeError: Cannot read properties of null (reading 'reduce')

The_Shubham_Soni
Автор

First of all how did you even get to the screen you started the video on. Didnt help a person that needs step by step.

Twosf
Автор

Thankyou so much. I changed my code from location.search to location?.search. and my login page is rendering now. Thanks again for doing the good work and helping.

amishaarora