OH3 Config parameter "script" is missing

openHAB 3.1.0~S2171-1 (Build #2171)

When I am trying to create any script using UI, I am getting this error:

**ERROR:HANDLER**  Getting handler 'scriptScriptAction' for module 'script' failed: Config parameter 'script' is missing in the configuration of module 'script'.    

How this can be fixed?
Thanks.

Show the steps you are taking.

Thanks Rich for your reply.
I just found that when script text actually added this error sign changed to “IDLE” and all is working.
So, I just suggest that

**ERROR:HANDLER**  Getting handler 'scriptScriptAction' for module 'script' failed: Config parameter 'script' is missing in the configuration of module 'script'.    

changed to message like “waiting for script”.
Thanks!

I am using the “Release Build” of openHAB 3.1.0 with Zulu Java 11.0.12. (I found out the hard was that Java 16 doesn’t work. I have a fresh install of Ubuntu 20. So, it is clean as a whistle.

I am getting this exact same error. And, only the most rudimentary scripts work. However, they won’t work at all unless I resolve the issue below:

2021-07-29 12:52:57.146 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error while creating ScriptEngine
org.graalvm.polyglot.PolyglotException: Error: Invalid CommonJS root folder: /etc/openhab/automation/lib/javascript/personal

(There is more to that error, but I don’t believe it is relevant)
I create the folder /etc/openhab/automation/lib/javascript/personal then I can run some scripts.

However, if I want to run a script like

itemRegistry.getItem('LocalMoon_MoonPhaseName').getState();

I get the error:

2021-07-29 13:33:00.428 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID '69f7181e4c' failed: org.graalvm.polyglot.PolyglotException: ReferenceError: "itemRegistry" is not defined

It doesn’t matter the item, it doesn’t matter if it is with Blockly or JS. I haven’t been able to get past this. That is why I have a fresh Ubuntu install with nothing but Java and OpenHAB installed. No matter what I do, I cannot script with items. I have seen various posts with errors like mine, but theirs go away, and mine simply do not.