Almost every tutorial I look at for Javascript uses require for accessing code from other files. When I run the code, however, I get this error:
ReferenceError: require is not defined in ES module scope, you can use import instead
So, I spend the next hour (at least) trying to figure out how to import the module properly. I am using Node v16.15.0. Should I be using a different version of Node? If not, why are all these tutorials using a different syntax? Is there a setting I should use that allows the use of require?