Skip to content

Commit 56b8319

Browse files
committed
fix(cubejs-cli): Check if correct directory is being deployed
1 parent bcfeb3f commit 56b8319

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/cubejs-cli/deploy.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ const fs = require('fs-extra');
22
const path = require('path');
33
const cliProgress = require('cli-progress');
44
const DeployDir = require('./DeployDir');
5-
const { logStage } = require('./utils');
5+
const { logStage, displayError } = require('./utils');
66
const Config = require('./Config');
77

88
exports.deploy = async ({ directory, auth }) => {
9+
if (!(await fs.pathExists(path.join(process.cwd(), 'node_modules', '@cubejs-backend/server-core')))) {
10+
await displayError(
11+
'@cubejs-backend/server-core dependency not found. Please run deploy command from project root directory and ensure npm install has been run.'
12+
);
13+
}
14+
915
const config = new Config();
1016
await config.loadDeployAuth();
1117
const bar = new cliProgress.SingleBar({

0 commit comments

Comments
 (0)