Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with building app when mysql port use different port than 3306 #10

Open
emillod opened this issue Sep 6, 2021 · 4 comments
Open

Comments

@emillod
Copy link

emillod commented Sep 6, 2021

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.
@yurikuzn
Copy link
Collaborator

yurikuzn commented Sep 6, 2021

Could help with the fix? Also check the log of the built espo.

@yurikuzn
Copy link
Collaborator

yurikuzn commented Sep 6, 2021

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.

@emillod
Copy link
Author

emillod commented Sep 6, 2021

Yeah, i already tried this. I found an two issues:

  1. In password there was "&" character and your script recognized this sign as point where should be another param
  2. 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'}
    );

@bandtank
Copy link
Contributor

This was fixed by #26. The issue should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants