ext-template
ext-template copied to clipboard
Issue with building app when mysql port use different port than 3306
Hello Guys, i think your template not work when user enter differnt port than 3306. I tried with 3307 and i received error. I think it's a problem with port, because after i tried command below, after building process, database is still empty.
➜ node build --all
Fetching EspoCRM repository...
Downloading EspoCRM archive from Github...
Unzipping...
Installing EspoCRM instance...
Creating config...
Npm install...
Building...
Install: step1...
Install: setupConfirmation...
Install: checkPermission...
Install: saveSettings...
Install: buildDatabase...
Install: createUser...
Install: finish...
Merge configs...
(node:11655) UnhandledPromiseRejectionWarning: Error: Command failed: php merge_configs.php
at checkExecSyncError (child_process.js:760:11)
at Object.execSync (child_process.js:833:15)
at /home/Projects/site/build.js:184:12
at new Promise (<anonymous>)
at install (/home/Projects/site/build.js:134:12)
at /home/Projects/site/build.js:16:9
(Use `node --trace-warnings ...` to show where the warning was created)
(node:11655) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:11655) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Could help with the fix? Also check the log of the built espo.
Might be here: https://github.com/espocrm/ext-template/blob/master/build.js#L170 Please let me know if you come up with a fix.
Yeah, i already tried this. I found an two issues:
- In password there was "&" character and your script recognized this sign as point where should be another param
- Like you noticed, i had to add port param in build.js. cp.execSync( "php install/cli.php -a setupConfirmation -d "host-name=" + config.database.host + ":" + config.database.port + "&db-name=" + config.database.dbname + "&db-user-name=" + config.database.user + "&db-user-password=" + config.database.password + """, {cwd: './site'} );
This was fixed by #26. The issue should be closed.