Menu

Cannot set properties of undefined (setting 'display')

In a scenario, I was trying to hide some HTML elements from the DOM at the runtime using the plain Javascript display property. When I was running the below JavaScript code to set the display=none for a particular element I was getting the error "Cannot set properties of undefined (setting 'display')".


document.getElementsByClassName("Feedback").style.display = "none";


This error I was seeing because the getElementsByClassName function was returning a list and hence system was unable to set the property because of ambiguity between list items. So to fix this we have to specify the index number next to getElementsByClassName function like below to set the style display=none.


document.getElementsByClassName('Feedback')[0].style.display = 'none';


The above statement will hide the first occurrence of an element that has class "Feedback".

Fatal error compiling: invalid target release: 11

Invalid target release compilation error is a build error that you are seeing because the project is set up to compile and build on JAVA 11, and your machine is running on a different version of JAVA that's JDK.

ENORESOLVER Bower resolver not found

Issue

bower ENORESOLVER Bower resolver not found: bower-nexus3-resolver

Solution

  1. Uninstall the npm and clean the npm cache.
  2. Then reinstall the npm

References