Venus 3.80 node-red editor monaco unknown global, msg, node

Node-red: node function : editor in mode monaco does not know variables “gobal, msg, node, …” . Function nodes are reported invalid ‘The workspace contains some nodes that are not properly configured:’
Worked find in 3.79

Please provide more detail and specifics about your nodered setup, flows and modules.
Which GX device?
Have not seen this reported for the lengthy beta.

Maybe export your flows.
Reset nodered to default (option in the UI) and try again importing your modules and flows.

hi Nick,

I use cerbo gx with node-red enabled. (as it is productive site, I never install betas)

below a screen-shot of a simple function node.

in 3.79 everything is fine.

in 3.80 terms ‘global’, ‘msg’, ‘node’ are underlined and node is in ‘invalid’ state. Node can be deploied and works, but this is very annoying - no way to distinguish ‘real’ invalid function nodes.

seems that editor is missing type-definitions of node-red specific types

Working fine here.

We wouldn’t have missed that issue.
What browser are you using?

Try the nodered factory reset.

Hi Nick,

seem to me that you use editor theme ‘ace’. As ‘ace’ does not make the corresponding validation of code, no error is shown an invalid flag is not set.

Is it also working fine for you if you user editor theme ‘monaco’ ?

I use settings below for editor

editorTheme: {
        codeEditor: {
            lib: "monaco",
            options: {
                  minimap: {
                    enabled: false
                 }
            }
        }
    }

According to the config file it is monaco, which it states as the default since v3.

            /** Select the text editor component used by the editor.    
             * As of Node-RED V3, this defaults to "monaco", but can be set to "ace" if desired
             */                                                                                
            lib: "monaco",                                                                     
            options: {                                                                         
                /** The follow options only apply if the editor is set to "monaco"             
                 *                                                                             
                 * theme - must match the file name of a theme in                              
                 * packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/theme  
                 * e.g. "tomorrow-night", "upstream-sunburst", "github", "my-theme"            
                 */                                                                          
                // theme: "vs",                                                              
                /** other overrides can be set e.g. fontSize, fontFamily, fontLigatures etc. 
                 * for the full list, see https://microsoft.github.io/monaco-editor/docs.html#i
                 */                                                                            
                //fontSize: 14,                                                                
                //fontFamily: "Cascadia Code, Fira Code, Consolas, 'Courier New', monospace",  
                //fontLigatures: true,                                                         
            }                   
},

hi Nick,

the grey underlined line-numbers ist typical for ‘ace’.

Two simple test to check if it’s really ‘monaco’ that you use

  1. Monaco shows an code preview (minimap) at the right (as long as you don’t disable it explicitely)

  1. If it’s monaco, edit a function node, click in the code area, then typing F1 should bring up a menu like below. If not, it’s probably not monaco

You’re correct, was looking in an obsolete settings file.
Victron default to ace.
Monaco behaves the same for me.

I have let the team know, but can’t promise when or if this will be looked at. Since it is a customisation of the build it is unlikely to be a priority. Just setting an expectation.