Troubleshooting
init says not a Flutter app
Section titled “init says not a Flutter app”Ensure pubspec.yaml contains Flutter SDK dependencies and you are in the project root (or pass --path).
Files not updating
Section titled “Files not updating”Default behavior skips existing files. Use --overwrite or rely on sync for managed regions.
Analyze failures in the gate
Section titled “Analyze failures in the gate”dart run stackchain doctor --skip-analyze# or temporarilystrict_quality: falseFix analyze issues, then re-enable strict mode for production.
GetX routing/DI not selected
Section titled “GetX routing/DI not selected”Set them explicitly, or omit them while state_management: getx so smart defaults apply.
AutoRoute / Injectable not generating
Section titled “AutoRoute / Injectable not generating”Run build_runner after pub get:
dart run build_runner build --delete-conflicting-outputsMigrate removed files I still needed
Section titled “Migrate removed files I still needed”Re-run with --keep-old from a clean commit, or restore from VCS and migrate again with --keep-old.
Migrate left ProviderScope / old state imports
Section titled “Migrate left ProviderScope / old state imports”Upgrade to 1.1.3+. migrate refreshes bootstrap.dart and app shell for the target stack. Re-run:
dart run stackchain migrate --state blocFeature name rejected
Section titled “Feature name rejected”Use snake_case: ^[a-z][a-z0-9_]*$ — e.g. user_profile, not UserProfile.
Cannot remove the last feature
Section titled “Cannot remove the last feature”Add another feature first, then remove the one you no longer need.
Rename target already exists
Section titled “Rename target already exists”Choose a free name, or remove the target feature first.