Well, the error information are pretty clear, you just need to look at your code to come to a conclusion. Without seeing the code, we can’t know anything about why these errors occur.
1st says there’s no element by the class name you’re searching for. Either it’s not there or you’re looking in the wrong place.
2nd says you’re trying to append something that is not an element. You can’t append a string, for example.
For example, that’s a string and won’t work:
let parent = document.getElementById("parent");
let element = "<div>lorem ipsum</div>";
parent.appendChild(element);
This will work:
let parent = document.getElementById("parent");
let element = document.createElement("div");
element.innerHTML = "lorem ipsum";
parent.appendChild(element);