I think (Model SDK team, correct me if I'm wrong) you are using an old Model SDK version. Could you check by looking at your dependency (see package.json -> dependencies -> mendixmodelsdk). If this states lower than 1.1.1 (see https://world.mendix.com/display/ReleaseNotes/Model+SDK+1.1.1 for the latest version) then I'm correct.
If so, fix it by doing the following:
VoilĂ .... you've updated your platform & model sdk package to the latest version (& saved it in package.json by using --save for future reference)
Version 1.0.2 included fix #585226 (https://world.mendix.com/display/ReleaseNotes/Model+SDK+1.0.2) which states: "All Model API infrastructure has been moved to Europe and the default endpoint of the API is updated."
I followed this tutorial and now mine works fine:
https://world.mendix.com/display/MXSDK/Setting+up+your+development+environment
This entire setup has to be done in "run as administrator" mode. Every program you open should be ran as administrator.
At "Setting up a working directory for your script", I changed directories to C:\Program Files\Mendix to create the my app generator folder.
Here's what I added to the package.json file.
{
"name": "my-app-generator",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"mendixmodelsdk": "^2.2.2",
"mendixplatformsdk": "^2.0.0",
"when": "^3.7.7"
}
}
The tutorial uses an outdated "when" statement so I suggest typing it out because the software will pick the correct version.
The rest of the steps run smoothly. Just make sure that youre in administrator mode.
Hope this helps.