Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Basics Hello, JavaScript! Debug JavaScript in the Console

Konstanze Pelargus
seal-mask
.a{fill-rule:evenodd;}techdegree
Konstanze Pelargus
Front End Web Development Techdegree Student 6,148 Points

Strange error code

I have the first line of the text exactly wrong written as in the video and received the following error message. I took a screenshot but can't shore.

•Uncaught TypeError: Cannot read properties of null (reading 'clientWidth') at terminal.js:108:35 at window. doResize (terminal.js: 45:16) at r.<anonymous> (terminal.js:27:5) at r.emit (index.js: 83:1) at r.emit (index.js: 83:1) at r.onconnect (index.js: 83:1) at r.onpacket (index.js:83:1) r. canonymous> (index.js: 83:1) at r.emit (index.js:83:1 at r.ondecoded (index.js: 83:1) © • Uncaught TypeError: Cannot read properties of null (reading 'clientwidth')

terminal.js: 108

My missing quote marks are not detected. Here is the snapshot. I know it's only the first line but the error should be detected. https://w.trhou.se/7nnpevd21b

When I click on terminal.js:108 at the far right it takes me to sources and this is what I see:

return function (term) { var testChar = getTestChar (); var container = term.element.offsetParent; return { cols: Math. floor(container.clientwidthAntestchar.aftsetwidthing rows: Math. floor (container. clientHeight / testChar.offsetHeight) }; };

What does this mean?

1 Answer

Steven Parker
Steven Parker
231,172 Points

Odd indeed! That error message seems to be referring to file names that don't exist at all in the snapshot!

I get a different response when I run the snapshot. The problem I see is caused by a missing quote mark:

alert(Hello, world!");     // current code, missing "
alert("Hello, world!");    // but should be this