Confirm from command prompt (there is 2 dashes): node --help
Install required packages from Visual Studio Code terminal tab/window.
npm install request
npm install xpath
npm install xmldom
npm install xml2js
Run. You can set breakpoints as well if wanted.
Running the JS script using Visual Studio Code and Node.JS will allow for expanded debugging of the .JS script. Based on your findings when running the script in Visual Studio Code you will have everything that is required to resolve issue with the script. This normally manifests as either a connection or licensing-related issue in your Debugger log within Visual Studio Code.