Did you ever try something like this in a .js file:
import ReactHtmlParser from 'react-html-parser';
and you ran
node file.js
and got the following error:
SyntaxError: Cannot use import statement outside a module
Well, this is now possible with node 13.2.0+
Simply add the following in your package.json:
"type": "module"
Now all your JavaScript files are interpreted as modules and you can now use the import statement instead of require which is from CommonJS.
Enjoy!