hasura/graphql-engine · error
moving %s to %s : %w
Error message
moving %s to %s : %w
What it means
Inside copyMigrations: copying a migration subdirectory with util.CopyDirAfero from the old parent directory to the new target directory failed. The message names the directory and target. Wrap of the underlying copy error.
Source
Thrown at cli/internal/scripts/update-project-v3.go:287
}
return nil
}
func copyMigrations(fs afero.Fs, dirs []string, parentDir, target string) error {
var op errors.Op = "scripts.copyMigrations"
for _, dir := range dirs {
f, _ := fs.Stat(filepath.Join(parentDir, dir))
if f != nil {
if f.IsDir() {
err := util.CopyDirAfero(
fs,
filepath.Join(parentDir, dir),
filepath.Join(target, dir),
)
if err != nil {
return errors.E(op, fmt.Errorf("moving %s to %s : %w", dir, target, err))
}
} else {
err := util.CopyFileAfero(
fs,
filepath.Join(parentDir, dir),
filepath.Join(target, dir),
)
if err != nil {
return errors.E(op, fmt.Errorf("moving %s to %s : %w", dir, target, err))
}
}
}
}
return nil
}
func copyFiles(fs afero.Fs, files []string, parentDir, target string) error {View on GitHub (pinned to 724551b9ae)
Solutions
- Check the named directory for permission or lock issues and fix them
- Verify the target path is writable and has space
- Copy the directory manually and re-run, or restore from VCS and retry
Defensive patterns
Strategy: validation
Validate before calling
if fi, err := os.Stat(filepath.Join(parentDir, dir)); err != nil || !fi.IsDir() {
return fmt.Errorf("migration dir %s unreadable", dir)
} Try / catch
if err := copyMigrations(fs, dirs, parent, target); err != nil {
// err names dir+target; verify readability, fix, retry that dir
} Prevention
- Keep migration directories free of locks/symlinks
- Ensure target has space and write permission
When it happens
Trigger: Copying a named migration directory (e.g. a non-numeric directory) fails due to unreadable/locked files inside it or an unwritable target path.
Common situations: Locked files on Windows, permission-restricted migration subdirectories, target disk full, or symlinked/odd directories the copier cannot traverse.
Related errors
- moving migrations to target database directory: %w
- error in copying starter kit: %w
- getting list of migrations to move: %w
- moving seeds to target database directory: %w
- removing up original migrations: %w
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/02a8f0fe73d48782.
Report an issue: GitHub.