We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fa7f99 commit a2e5e9fCopy full SHA for a2e5e9f
packages/cubejs-server-core/src/core/DevServer.ts
@@ -503,8 +503,12 @@ export class DevServer {
503
if (!variables.CUBEJS_API_SECRET) {
504
variables.CUBEJS_API_SECRET = options.apiSecret;
505
}
506
-
507
- const envs = dotenv.parse(fs.readFileSync(path.join(process.cwd(), '.env')));
+
+ let envs: Record<string, string> = {};
508
+ const envPath = path.join(process.cwd(), '.env');
509
+ if (fs.existsSync(envPath)) {
510
+ envs = dotenv.parse(fs.readFileSync(envPath));
511
+ }
512
513
const schemaPath = envs.CUBEJS_SCHEMA_PATH || 'model';
514
0 commit comments