VeryGoodOpenSource / very_good_cli

A Very Good Command-Line Interface for Dart created by Very Good Ventures 🦄
http://cli.vgv.dev
MIT License
2.11k stars 184 forks source link

App has errors in app_localizations.dart after `very_good create` #1065

Open icodeyou opened 2 weeks ago

icodeyou commented 2 weeks ago

Description A clear and concise description of what the bug is.

Steps To Reproduce

  1. Run this command in your terminal : very_good create flutter_app foo

  2. Go to the folder foo/

  3. Run the command : flutter run --flavor development -t lib/main_development.dart

  4. I see the error :

    Error (Xcode): lib/l10n/l10n.dart:2:8: Error: Error when reading '../../../../../../../.pub-cache/hosted/pub.dev/flutter_gen-5.5.0+1/lib/gen_l10n/app_localizations.dart': No such file or directory

Expected Behavior The code should compile after very_good create flutter_app foo

Screenshots

image

Additional Context FYI, the error only occurs for common names. If I use a unique ID as the name of the app, it will work (ex : very_good create flutter_app xyz_abk_ojp)

I am on macOS M2, Sonoma 14.5 very_good version : 0.22.0 Flutter version : 3.22.2

alestiago commented 2 weeks ago

Thanks @icodeyou for opening this issue. Can you include a sample of your pubspec.yaml? Does it have flutter_gen: any, if so, if you remove it and try again does it work?

SamC-Apadmi commented 1 week ago

The solution here seems to fix it for me https://github.com/flutter/flutter/issues/147047