Ideally you should delete the rules, remove the rule template, and install the rewritten rule that was rewritten for OH 4. Debounce [4.0.0.0;5.9.9.9]
If you want to try to keep this old version you need to either:
-
Install the Nashorn JS add-on and change the type to
application/javascript;version=ECMAScript-5.1
-
Install the GraalVM add-on and leave the type
application/javascript
But I’ve rewritten all of my rule templates for OH 4 and you should really move to the newer ones. I’m not going to maintain these 3.x versions of the template and the new ones work better and have better error checking. Some of the rule templates have changed behaviors slightly so be sure to read the docs for the template.