VeryGoodOpenSource / very_good_cli

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

fix: No hosted dependencies found in [project directory] of type: direct-main. #1150

Closed charles0122 closed 1 month ago

charles0122 commented 1 month ago

Description


arce@ArcedeiMac ~ % very_good create flutter_app the_ninth_art --desc "My new Flutter app" --org "top.arce.theninthart"
✓ Generated 303 file(s) (8.0s)
✓ Running "flutter pub get" in .  (3.6s)
✓ Running "dart fix --apply" in ./the_ninth_art (6.1s)

Created a Very Good App! 🦄
  • To get started refer to the_ninth_art/README.md
  • Your project code is in the_ninth_art

+----------------------------------------------------+
| Looking for more features?                         |
| We have an enterprise-grade solution for companies |
| called Very Good Start.                            |
|                                                    |
| For more info visit:                               |
| https://verygood.ventures/solution/very-good-start |
+----------------------------------------------------+

Update available! 0.22.2 → 0.23.1
Changelog: https://github.com/verygoodopensource/very_good_cli/releases/tag/v0.23.1
Run very_good update to update
arce@ArcedeiMac ~ % cd the_ninth_art 
arce@ArcedeiMac the_ninth_art % very_good packages check licenses
No hosted dependencies found in /Users/arce/the_ninth_art of type: direct-main.

Update available! 0.22.2 → 0.23.1
Changelog: https://github.com/verygoodopensource/very_good_cli/releases/tag/v0.23.1
Run very_good update to update
arce@ArcedeiMac the_ninth_art % very_good packages get           
✓ Running "flutter pub get" in .  (1.4s)

Update available! 0.22.2 → 0.23.1
Changelog: https://github.com/verygoodopensource/very_good_cli/releases/tag/v0.23.1
Run very_good update to update
arce@ArcedeiMac the_ninth_art % very_good packages check licenses
No hosted dependencies found in /Users/arce/the_ninth_art of type: direct-main.

Update available! 0.22.2 → 0.23.1
Changelog: https://github.com/verygoodopensource/very_good_cli/releases/tag/v0.23.1
Run very_good update to update

Steps To Reproduce

very_good create flutter_app the_ninth_art --desc "My new Flutter app" --org "top.arce.theninthart" \
very_good packages check licenses

Expected Behavior

check licenses command execute.

Additional Context

No response

alestiago commented 1 month ago

Hi @charles0122 👋🏻, thanks for opening an issue!

I was unable to reproduce by doing:

very_good create flutter_app the_ninth_art --desc "My new Flutter app" --org "top.arce.theninthart" \
cd the_ninth_art
very_good packages check licenses

I got:

✓ Retrieved 3 licenses from 3 packages of type: MIT (2) and BSD-3-Clause (1). (0.8s)

The pubspec.yaml of the created project looks like:

name: the_ninth_art
description: My new Flutter app
version: 1.0.0+1
publish_to: none

environment:
  sdk: ^3.5.0

dependencies:
  bloc: ^8.1.4
  flutter:
    sdk: flutter
  flutter_bloc: ^8.1.6
  flutter_localizations:
    sdk: flutter
  intl: ^0.19.0

dev_dependencies:
  bloc_test: ^9.1.7
  flutter_test:
    sdk: flutter
  mocktail: ^1.0.4
  very_good_analysis: ^6.0.0

flutter:
  uses-material-design: true
  generate: true

I was using Very Good CLI 0.23.1. Can you try updating to the latest Very Good CLI version and reach out with the results after the update?

charles0122 commented 1 month ago
arce@ArcedeiMac StudioProjects % fvm flutter --version
Flutter 3.24.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2663184aa7 (10 days ago) • 2024-09-11 16:27:48 -0500
Engine • revision 36335019a8
Tools • Dart 3.5.3 • DevTools 2.37.3

arce@ArcedeiMac StudioProjects % very_good create flutter_app the_ninth_art --desc "My new Flutter app" --org "top.arce.theninthart"
✓ Generated 303 file(s) (6.8s)
✓ Running "flutter pub get" in .  (40.5s)
✓ Running "dart fix --apply" in ./the_ninth_art (8.5s)

Created a Very Good App! 🦄
  • To get started refer to the_ninth_art/README.md
  • Your project code is in the_ninth_art

+----------------------------------------------------+
| Looking for more features?                         |
| We have an enterprise-grade solution for companies |
| called Very Good Start.                            |
|                                                    |
| For more info visit:                               |
| https://verygood.ventures/solution/very-good-start |
+----------------------------------------------------+
arce@ArcedeiMac StudioProjects % cd the_ninth_art 
arce@ArcedeiMac the_ninth_art % very_good packages check licenses
No hosted dependencies found in /Users/arce/StudioProjects/the_ninth_art of type: direct-main.
arce@ArcedeiMac the_ninth_art % fvm flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 13.6.4 22G513 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Android Studio (version 2024.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.4)
[✓] Connected device (1 available)
[✓] Network resources

• No issues found!

arce@ArcedeiMac the_ninth_art % ls
README.md       build           l10n.yaml       pubspec.lock        web
analysis_options.yaml   coverage_badge.svg  lib         pubspec.yaml        windows
android         ios         macos           test
charles0122 commented 1 month ago

I guess the reason for this problem is that the pubspec file is not found. I use fvm to manage my own flutter version, which should not affect the cli.

charles0122 commented 1 month ago
arce@ArcedeiMac the_ninth_art % flutter --version
Flutter 3.24.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2663184aa7 (10 days ago) • 2024-09-11 16:27:48 -0500
Engine • revision 36335019a8
Tools • Dart 3.5.3 • DevTools 2.37.3
arce@ArcedeiMac the_ninth_art % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 13.6.4 22G513 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Android Studio (version 2024.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.4)
[✓] Connected device (1 available)
[✓] Network resources

• No issues found!
alestiago commented 1 month ago

I guess the reason for this problem is that the pubspec file is not found. I use fvm to manage my own flutter version, which should not affect the cli.

You have to run the command at the same directory level where your pubspec is. Using fvm should not affect.


Going forward, from the information you're given I can't do much. Can you write some new reproductive steps over? What is the content of your pubspec?