hasura/graphql-engine · error
getting list of seed files to move: %w
Error message
getting list of seed files to move: %w
What it means
Thrown by scripts.UpdateProjectV3 when getSeedFiles fails while listing seed files under the seeds directory that must be moved to the per-database V3 layout. The %w wraps the underlying filesystem error from reading the seeds directory.
Source
Thrown at cli/internal/scripts/update-project-v3.go:167
opts.EC.Logger.Debug("completed: copying state from hdb_catalog.schema_migrations")
}
opts.EC.Logger.Debug("start: copy old migrations to new directory structure")
opts.EC.Spin("Moving migrations and seeds to new directories ")
// move migration child directories
// get directory names to move
migrationDirectoriesToMove, err := getMigrationDirectoryNames(
opts.Fs,
opts.MigrationsAbsDirectoryPath,
)
if err != nil {
return errors.E(op, fmt.Errorf("getting list of migrations to move: %w", err))
}
// move seed child directories
// get directory names to move
seedFilesToMove, err := getSeedFiles(opts.Fs, opts.SeedsAbsDirectoryPath)
if err != nil {
return errors.E(op, fmt.Errorf("getting list of seed files to move: %w", err))
}
// create a new directory for TargetDatabase
targetMigrationsDirectoryName := filepath.Join(opts.MigrationsAbsDirectoryPath, targetDatabase)
if err = opts.Fs.Mkdir(targetMigrationsDirectoryName, 0o755); err != nil {
return errors.E(op, fmt.Errorf("creating target migrations directory: %w", err))
}
// create a new directory for TargetDatabase
targetSeedsDirectoryName := filepath.Join(opts.SeedsAbsDirectoryPath, targetDatabase)
if err = opts.Fs.Mkdir(targetSeedsDirectoryName, 0o755); err != nil {
return errors.E(op, fmt.Errorf("creating target seeds directory: %w", err))
}
// move migration directories to target database directory
if err := copyMigrations(
opts.Fs,
migrationDirectoriesToMove,View on GitHub (pinned to 724551b9ae)
Solutions
- Check the seeds_dir setting in config.yaml and ensure that directory exists (or remove the setting to use the default seeds/)
- Create the directory if it's missing (mkdir -p seeds)
- Fix permissions or run from the correct project root
Example fix
# config.yaml # before: seeds_dir: custom-seeds # directory deleted # after: seeds_dir: seeds # mkdir seeds first, or point to existing dir
Defensive patterns
Strategy: validation
Validate before calling
seedsDir := "seeds" // or read seeds_dir from config
if info, err := os.Stat(seedsDir); err != nil {
if os.IsNotExist(err) {
if mkErr := os.MkdirAll(seedsDir, 0o755); mkErr != nil {
return mkErr
}
} else {
return err
}
} else if !info.IsDir() {
return fmt.Errorf("%s is not a directory", seedsDir)
} Prevention
- Keep seeds_dir in config.yaml pointing at an existing directory
- Create seeds/ in the repo (even empty) before running upgrade scripts
When it happens
Trigger: Running update-project-v3 when the seeds directory path configured in config.yaml doesn't exist, isn't a directory, or is unreadable by the process.
Common situations: config.yaml's seeds_dir pointing at a custom path that was renamed/deleted, permissions problems, or running the command outside the project root.
Related errors
- getting list of migrations to move: %w
- error opening file: %w
- error walking the directory path: %w
- creating metadata file %s failed: %w
- cannot upgrade: unsupported server version %v, config V3 is
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/c2af7b78f90b239f.
Report an issue: GitHub.