{"record":{"id":"0ec42380ccf745e5","repo":"hasura/graphql-engine","slug":"cannot-create-seeds-directory-w","errorCode":null,"errorMessage":"cannot create seeds directory: %w","messagePattern":"cannot create seeds directory: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/cli.go","lineNumber":758,"sourceCode":"\t\t\t\"cannot get config information from server, this might be because config API is not enabled: %v\",\n\t\t\terr,\n\t\t)\n\t}\n\n\t// set name of migration directory\n\tec.MigrationDir = filepath.Join(ec.ExecutionDirectory, ec.Config.MigrationsDirectory)\n\tif _, err := os.Stat(ec.MigrationDir); stderrors.Is(err, fs.ErrNotExist) {\n\t\terr = os.MkdirAll(ec.MigrationDir, os.ModePerm)\n\t\tif err != nil {\n\t\t\treturn errors.E(op, fmt.Errorf(\"cannot create migrations directory: %w\", err))\n\t\t}\n\t}\n\n\tec.SeedsDirectory = filepath.Join(ec.ExecutionDirectory, ec.Config.SeedsDirectory)\n\tif _, err := os.Stat(ec.SeedsDirectory); stderrors.Is(err, fs.ErrNotExist) {\n\t\terr = os.MkdirAll(ec.SeedsDirectory, os.ModePerm)\n\t\tif err != nil {\n\t\t\treturn errors.E(op, fmt.Errorf(\"cannot create seeds directory: %w\", err))\n\t\t}\n\t}\n\n\tif ec.Config.Version >= V2 && ec.Config.MetadataDirectory != \"\" {\n\t\tif len(ec.Config.MetadataFile) > 0 {\n\t\t\tec.MetadataFile = filepath.Join(ec.ExecutionDirectory, ec.Config.MetadataFile)\n\t\t\tif _, err := os.Stat(ec.MetadataFile); stderrors.Is(err, fs.ErrNotExist) {\n\t\t\t\terr := os.WriteFile(ec.MetadataFile, []byte(\"\"), os.ModePerm)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn errors.E(op, err)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch filepath.Ext(ec.MetadataFile) {\n\t\t\tcase \".json\":\n\t\t\t\tec.MetadataMode = MetadataModeJSON\n\t\t\tcase \".yaml\":\n\t\t\t\tec.MetadataMode = MetadataModeYAML","sourceCodeStart":740,"sourceCodeEnd":776,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/cli.go#L740-L776","documentation":"A metadata value referenced a secret by name via `from_env`/secret interpolation, but no environment variable/secret with that name was found in the resolver's environment. The resolver resolves secret references eagerly and fails when missing.","triggerScenarios":"Metadata containing something like `{{env.MY_SECRET}}` or `from_env: MY_SECRET` where MY_SECRET is not set in the process environment at resolve time.","commonSituations":"Deploying without setting required env vars; local runs missing the .env file; renaming env vars in one environment but not the metadata; CI pipelines not injecting secrets.","solutions":["Set the missing environment variable/secret named in the error and re-run","Verify the exact name spelling and case in both metadata and environment","For deployments, ensure the secret is injected into the container/process environment"],"exampleFix":"# before\nfrom_env: DATABASE_PASSWRD\n# after\nfrom_env: DATABASE_PASSWORD\n# and: export DATABASE_PASSWORD=...","handlingStrategy":"validation","validationCode":"for name in referenced_secrets(&metadata) {\n    assert!(std::env::var(&name).is_ok(), \"secret {name} missing from environment\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Maintain a list of required env vars per environment and validate at startup","Use the same secret names in metadata and deployment manifests; add them to CI secrets"],"tags":["secrets","environment","configuration"],"backgroundTag":"missing-env-var","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}