cube-js/cube · error
'${driver}' driver dependency not found
Error message
'${driver}' driver dependency not found What it means
Not a thrown error: the GET /playground/driver endpoint in DevServer returns 404-style JSON with status null when the requested driver dependency package is neither installed nor currently being installed (no in-flight install and no recorded driverError), i.e. the driver dependency is unknown to this server instance yet.
Source
Thrown at packages/cubejs-server-core/src/core/DevServer.ts:351
if (packageExists(DriverDependencies[driver as keyof typeof DriverDependencies])) {
return res.json({ status: 'installed' });
} else if (driverPromise) {
return res.json({ status: 'installing' });
} else if (driverError) {
return res.status(500).json({
status: 'error',
error: driverError.toString()
});
}
return res.json({ status: null });
}));
app.post('/playground/driver', catchErrors((req, res) => {
const { driver } = req.body;
if (!driver || typeof driver !== 'string' || !DriverDependencies[driver as keyof typeof DriverDependencies]) {
return res.status(400).json(`'${driver}' driver dependency not found`);
}
const driverKey = driver as keyof typeof DriverDependencies;
async function installDriver() {
driverError = null;
try {
await executeCommand(
'npm',
['install', DriverDependencies[driverKey], '--save-dev'],
{ cwd: path.resolve('.') }
);
} catch (error) {
driverError = error as Error;
} finally {
driverPromise = null;
}View on GitHub (pinned to 7d981676b3)
Solutions
- POST to /playground/driver with the driver name to trigger installation of the dependency package.
- Verify the driver name is one of the supported keys in DriverDependencies (e.g. 'postgres', 'mysql').
- If install was expected, check server logs for failed npm install attempts.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/cubejs-server-core/src/core/DevServer.ts:351 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/47f8eb10b25de182.
Report an issue: GitHub.