{"record":{"id":"1550caf51a20a785","repo":"hasura/graphql-engine","slug":"error-in-copying-starter-kit-w","errorCode":null,"errorMessage":"error in copying starter kit: %w","messagePattern":"error in copying starter kit: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/commands/actions_use_codegen.go","lineNumber":217,"sourceCode":"\t\t\tstarterKitDirname = newCodegenExecutionConfig.Framework + \"-\" + strconv.Itoa(suffix)\n\t\t\tsuffix++\n\t\t\terr = util.FSCheckIfDirPathExists(starterKitDirname)\n\t\t}\n\n\t\t// copy the starter kit\n\t\tdestinationDir := filepath.Join(o.EC.ExecutionDirectory, starterKitDirname)\n\n\t\terr = util.FSCopyDir(\n\t\t\tfilepath.Join(\n\t\t\t\to.EC.GlobalConfigDir,\n\t\t\t\tutil.ActionsCodegenDirName,\n\t\t\t\tnewCodegenExecutionConfig.Framework,\n\t\t\t\t\"starter-kit\",\n\t\t\t),\n\t\t\tdestinationDir,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn errors.E(op, fmt.Errorf(\"error in copying starter kit: %w\", err))\n\t\t}\n\n\t\to.EC.Logger.Info(\"Starter kit cloned at \" + destinationDir)\n\t}\n\n\to.EC.Spinner.Stop()\n\n\t// if output directory is not provided, make them enter it\n\tif o.outputDir == \"\" {\n\t\toutputDir, err := util.GetFSPathPrompt(\n\t\t\t\"Where do you want to place the codegen files?\",\n\t\t\to.EC.Config.ActionConfig.Codegen.OutputDir,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn errors.E(op, fmt.Errorf(\"error in getting output directory input: %w\", err))\n\t\t}\n\n\t\tnewCodegenExecutionConfig.OutputDir = outputDir","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/commands/actions_use_codegen.go#L199-L235","documentation":"Thrown when copying the starter kit from the cloned codegen-assets repo (assets/<framework>/starter-kit) to the destination directory fails — a filesystem-level copy (util.CopyDir-style) error such as missing source, existing destination, or permission denied.","triggerScenarios":"Cloning a starter kit when the destination path already exists and is non-empty, the source starter-kit dir is absent from a stale/partial clone, or the destination parent directory is not writable.","commonSituations":"Running --with-starter-kit into a non-empty project directory twice; clone missing the starter-kit subdir after a CLI/asset version mismatch; read-only workspace in CI.","solutions":["Choose a fresh, empty destination directory (or remove the previous starter kit copy).","Verify write permissions on the destination parent.","Refresh the codegen-assets clone if starter-kit files are missing."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"DEST=./my-app; [ ! -e \"$DEST\" ] && [ -w \"$(dirname \"$DEST\")\" ] && echo ok","typeGuard":null,"tryCatchPattern":"Catch, clear or rename the destination, confirm source kit exists in the clone, then retry.","preventionTips":["Clone starter kits into fresh empty directories.","Never run --with-starter-kit into an existing project root.","Keep the clone refreshed."],"tags":["filesystem","starter-kit","hasura-cli","copy"],"backgroundTag":"directory-copy-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}