diff --git a/deploy.sh b/deploy.sh index 5f63a8bd..78eb3ea5 100644 --- a/deploy.sh +++ b/deploy.sh @@ -91,4 +91,4 @@ if [[ "$IN_PLACE_DEPLOYMENT" -ne "1" ]]; then fi ################################################################################################################################## -echo "[General Bots Deployer]Finished successfully." \ No newline at end of file +echo "[General Bots Deployer] Finished successfully." \ No newline at end of file diff --git a/packages/core.gbapp/services/GBDeployer.ts b/packages/core.gbapp/services/GBDeployer.ts index 1a10c431..6904c4cc 100644 --- a/packages/core.gbapp/services/GBDeployer.ts +++ b/packages/core.gbapp/services/GBDeployer.ts @@ -809,6 +809,7 @@ export class GBDeployer implements IGBDeployer { // Install modules and compiles the web app. GBLog.info(`Installing modules default.gbui (It may take a few minutes)...`); + child_process.execSync(`rm -r node_modules`, { cwd: root }); child_process.execSync(`${npm} install`, { cwd: root }); GBLog.info(`Transpiling default.gbui...`); diff --git a/src/app.ts b/src/app.ts index 9c143fc8..c64e8857 100644 --- a/src/app.ts +++ b/src/app.ts @@ -159,6 +159,11 @@ export class GBServer { await deployer.deployPackages(core, server, GBServer.globals.appPackages); await core.syncDatabaseStructure(); + // Deployment of local applications for the first time. + + if (GBConfigService.get('DISABLE_WEB') !== 'true') { + deployer.setupDefaultGBUI(); + } GBLog.info(`Publishing instances...`); const instances: IGBInstance[] = await core.loadAllInstances( @@ -192,11 +197,6 @@ export class GBServer { GBServer.globals.minService = minService; await minService.buildMin(instances); - // Deployment of local applications for the first time. - - if (GBConfigService.get('DISABLE_WEB') !== 'true') { - deployer.setupDefaultGBUI(); - } GBLog.info(`The Bot Server is in RUNNING mode...`);