hasura/graphql-engine · error
error in copying starter kit: %w
Error message
error in copying starter kit: %w
What it means
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.
Source
Thrown at cli/commands/actions_use_codegen.go:217
starterKitDirname = newCodegenExecutionConfig.Framework + "-" + strconv.Itoa(suffix)
suffix++
err = util.FSCheckIfDirPathExists(starterKitDirname)
}
// copy the starter kit
destinationDir := filepath.Join(o.EC.ExecutionDirectory, starterKitDirname)
err = util.FSCopyDir(
filepath.Join(
o.EC.GlobalConfigDir,
util.ActionsCodegenDirName,
newCodegenExecutionConfig.Framework,
"starter-kit",
),
destinationDir,
)
if err != nil {
return errors.E(op, fmt.Errorf("error in copying starter kit: %w", err))
}
o.EC.Logger.Info("Starter kit cloned at " + destinationDir)
}
o.EC.Spinner.Stop()
// if output directory is not provided, make them enter it
if o.outputDir == "" {
outputDir, err := util.GetFSPathPrompt(
"Where do you want to place the codegen files?",
o.EC.Config.ActionConfig.Codegen.OutputDir,
)
if err != nil {
return errors.E(op, fmt.Errorf("error in getting output directory input: %w", err))
}
newCodegenExecutionConfig.OutputDir = outputDirView on GitHub (pinned to 724551b9ae)
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.
Defensive patterns
Strategy: validation
Validate before calling
DEST=./my-app; [ ! -e "$DEST" ] && [ -w "$(dirname "$DEST")" ] && echo ok
Try / catch
Catch, clear or rename the destination, confirm source kit exists in the clone, then retry.
Prevention
- Clone starter kits into fresh empty directories.
- Never run --with-starter-kit into an existing project root.
- Keep the clone refreshed.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- moving migrations to target database directory: %w
- moving seeds to target database directory: %w
- moving %s to %s : %w
- error generating codegen for action %s: %w
- error in fetching codegen frameworks: %w
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/1550caf51a20a785.
Report an issue: GitHub.