Skip to content

Commit a7d519c

Browse files
committed
fix: npm installs old dependencies on dashboard creation
1 parent 66fe156 commit a7d519c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

packages/cubejs-server-core/core/DevServer.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,20 @@ class DevServer {
175175
const toInstall = Object.keys(dependencies).filter(dependency => !packageJson.dependencies[dependency]);
176176
if (toInstall.length) {
177177
this.cubejsServer.event('Dev Server Dashboard Npm Install');
178+
await executeCommand(
179+
'npm',
180+
['install'],
181+
{ cwd: path.resolve(dashboardAppPath) }
182+
);
183+
const cubeDependencies = toInstall.filter(p => p.match(/^@cubejs/));
178184
await executeCommand(
179185
'npm',
180186
['install', '--save'].concat(toInstall),
181187
{ cwd: path.resolve(dashboardAppPath) }
182188
);
183189
await executeCommand(
184190
'npm',
185-
['install'],
191+
['update'].concat(cubeDependencies),
186192
{ cwd: path.resolve(dashboardAppPath) }
187193
);
188194
this.cubejsServer.event('Dev Server Dashboard Npm Install Success');

packages/cubejs-server/yarn.lock

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,10 @@
158158
ramda "^0.24.1"
159159
syntax-error "^1.3.0"
160160

161-
"@cubejs-backend/server-core@^0.10.41":
162-
version "0.10.41"
163-
resolved "https://registry.yarnpkg.com/@cubejs-backend/server-core/-/server-core-0.10.41.tgz#c358b60eead7bb3555adf4b9d6e81c5c7ff520db"
161+
"@cubejs-backend/server-core@^0.10.43":
162+
version "0.10.43"
163+
resolved "https://registry.yarnpkg.com/@cubejs-backend/server-core/-/server-core-0.10.43.tgz#4fa6b7da653bcdab1250627deb8d4b47c6e7c385"
164+
integrity sha512-TRtdP8AORvW2w9dD9a6jIcALTeytsLgEUM+l6H/1hvU0WuOrez8NPfrGEQp4BPz5yUfBEaIZG3VhN1OLENkNKA==
164165
dependencies:
165166
"@cubejs-backend/api-gateway" "^0.10.34"
166167
"@cubejs-backend/query-orchestrator" "^0.10.35"

0 commit comments

Comments
 (0)