Update:
I tried to inspect the script that is checking out the code from git, and there is an error there, when I switch to visual editor:

and in the log:
at System.Collections.Generic.Dictionary2.FindValue(TKey key) at System.Collections.Generic.Dictionary2.ContainsKey(TKey key)
at Inedo.BuildMaster.Web.WebApplication.Pages.OtterScriptEditor.OSVE.BuildOsveStatementDyanmic(ActionStatement statement)
at Inedo.BuildMaster.Web.WebApplication.Pages.OtterScriptEditor.OSVE.BuildOsveStatement(Statement statement)
at Inedo.BuildMaster.Web.WebApplication.Pages.OtterScriptEditor.OSVE.<>c.<BuildOsveScript>b__0_1(Statement s)
at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at System.Linq.Enumerable.ConcatIterator1.ToList()
at Inedo.BuildMaster.Web.WebApplication.Pages.OtterScriptEditor.OSVE.BuildOsveScript(ScriptProcessorOutput output)
As well as:

This is the script that is causing the visual editor to crash:
set $NpmPath = C:\Program Files\nodejs\npm.cmd;
Git::Checkout-Code
(
From: "..........reponame...."
);
# Install Dependencies npm
Exec
(
FileName: $NpmPath,
Arguments: install,
WorkingDirectory: ~\,
ErrorOutputLogLevel: Warning
);
# Build webpack
Exec
(
FileName: $NpmPath,
Arguments: run build:webpack,
WorkingDirectory: ~\,
ErrorOutputLogLevel: Warning
);
Create-Artifact
(
From: Swift/Files
);