{"record":{"id":"0f8cb1da77269eab","repo":"cube-js/cube","slug":"the-schema-file-for-cubename-cube-was-not-fou","errorCode":null,"errorMessage":"The schema file for \"${cubeName}\" cube was not found or could not be updated. Only JS and non-templated YAML files are supported.","messagePattern":"The schema file for \"(.+?)\" cube was not found or could not be updated\\. Only JS and non-templated YAML files are supported\\.","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"packages/cubejs-server-core/src/core/DevServer.ts","lineNumber":644,"sourceCode":"        new CubePreAggregationConverter({\n          cubeName,\n          preAggregationName,\n          code\n        })\n      ]);\n\n      try {\n        await schemaConverter.generate(cubeName);\n      } catch (error) {\n        return res.status(400).json({ error: (error as Error).message || error });\n      }\n\n      const file = schemaConverter.getSourceFiles().find(\n        ({ cubeName: currentCubeName }) => currentCubeName === cubeName\n      );\n\n      if (!file) {\n        return res.status(400).json({ error: `The schema file for \"${cubeName}\" cube was not found or could not be updated. Only JS and non-templated YAML files are supported.` });\n      }\n\n      this.cubejsServer.repository.writeDataSchemaFile(file.fileName, file.source);\n      return res.json('ok');\n    }));\n  }\n\n  protected getIdentifier(apiSecret: string): string {\n    return crypto.createHash('md5')\n      .update(apiSecret)\n      .digest('hex')\n      .replace(/[^\\d]/g, '')\n      .slice(0, 10);\n  }\n}\n","sourceCodeStart":626,"sourceCodeEnd":660,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-server-core/src/core/DevServer.ts#L626-L660","documentation":"Not a thrown error: in the DevServer pre-aggregation conversion endpoint, after a successful schema conversion this 400 JSON response is returned when no generated source file matches the requested cubeName — the converter could not produce/update a schema file for that cube, typically because the source is a templated YAML or otherwise unsupported format.","triggerScenarios":"Thrown at packages/cubejs-server-core/src/core/DevServer.ts:644 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Convert the cube's schema to plain (non-templated) YAML or JavaScript before attempting pre-aggregation conversion.","Verify the cubeName matches the cube defined in the repository files.","Check repository data sources are configured so the converter can locate the schema file."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}