Cannot read property 'DBID' of undefined

I am using PHPMaker 2020.0.16
When I am trying to generate the files I got this failure. This is at all my projects:

Generating ewcfg.php…
undefined:4
var __output=“”;function __append(s){if(s!==undefined&&s!==null)__output+=s}var write=__append;let _arguments=arguments[0]||{},{db:db}=_arguments;let dbId=db.DBID,dbType=DbType(dbId),dbUid=db.DBUID,dbPwd=db.DBPwd,dbPort=!IsEmpty(db.DBPort)?db.DBPort:Code.null,isMsAccess=dbType==“ACCESS”,isMsSql=dbType==“MSSQL”,isMySql=dbType==“MYSQL”,isSqlite=dbType==“SQLITE”,isPostgreSql=dbType==“POSTGRESQL”,isOracle=dbType==“ORACLE”;let encryptionKey=PROJ.EncryptionKey||“”;if(encryptionKey&&PROJ.EncryptUsernamePassword){dbUid=PhpEncrypt(dbUid,encryptionKey,database (${dbId}) username);dbPwd=PhpEncrypt(dbPwd,encryptionKey,database (${dbId}) password)}let connection="id" => "${Code.quote(dbId)}", "type" => "${dbType}", "qs" => "${Code.quote(db.DBQuoteS)}", "qe" => "${Code.quote(db.DBQuoteE)}";if(isMySql||isPostgreSql){connection+=, "host" => "${Code.quote(db.DBHost)}", "port" => ${dbPort}, "user" => "${Code.quote(dbUid)}", "pass" => "${Code.quote(dbPwd)}", "db" => "${Code.quote(db.DBName)}";if(isMySql){i
TypeError: Cannot read property ‘DBID’ of undefined
at eval (eval at compile (C:\Program Files (x86)\PHPMaker 2020\node\node_modules\phpmaker\phpmaker.js:7:5522), :4:159)
at i (C:\Program Files (x86)\PHPMaker 2020\node\node_modules\phpmaker\phpmaker.js:7:5739)
at eval (eval at compile (C:\Program Files (x86)\PHPMaker 2020\node\node_modules\phpmaker\phpmaker.js:7:5522), :210:36)
at i (C:\Program Files (x86)\PHPMaker 2020\node\node_modules\phpmaker\phpmaker.js:7:5739)
at global.GenerateFile (C:\Program Files (x86)\PHPMaker 2020\node\node_modules\phpmaker\phpmaker.js:7:359974)
at C:\Program Files (x86)\PHPMaker 2020\node\node_modules\phpmaker\phpmaker.js:7:366972
at Array.map ()
at Object. (C:\Program Files (x86)\PHPMaker 2020\node\node_modules\phpmaker\phpmaker.js:7:366952)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:973:10)
Compiling calvijn2020.css…

  1. Make sure you have already re-synchronized your project with the database,
  2. Make sure you have already removed the template cache from “Tools” → “Delete Template Cache”,
  3. Make sure you have already updated the template from “Tools” → “Update Template”,
  4. Make sure you have already re-generated ALL the script files, and try again.

Thanks. I tried your suggestions but it didn’t help

It seems that a database is null so it cannot access its DBID. If you have Linked Tables, double check the database connection info the linked databases. If you changed the connection info, you need to update it first. You may try to synchronize your project with the databases first, then generate all scripts to try again. If you have any server events that specifies a database connection or database name, double check.

Thanks.
I didn’t use linked tables. All my tables and views seems to work correct.

Problem solved.
I didn’t execute phpmaker.exe as administrator.

Normally running PHPMaker as administrator is not required, did you generate files to a project folder which requires permissions (e.g. somewhere under C:\ but not your Documents folder)?

Same problem. If i return to older template php20200_2020001600.zip generation complete successful.
if i start as admin generation complete successful with new template