Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

very_good command not work #156

Closed
lkrjangid1 opened this issue Jul 24, 2021 · 18 comments
Closed

very_good command not work #156

lkrjangid1 opened this issue Jul 24, 2021 · 18 comments
Assignees
Labels
bug Something isn't working as expected

Comments

@lkrjangid1
Copy link

lkrjangid1 commented Jul 24, 2021

Successfully install

PS C:\Users\lkrja\AndroidStudioProjects> dart pub global activate very_good_cli
Package very_good_cli is currently active at version 0.3.0.
Resolving dependencies...
The package very_good_cli is already activated at newest available version.
To recompile executables, first run `global decativate very_good_cli`.
Installed executable very_good.
Warning: Pub installs executables into C:\Users\lkrja\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory to your system's "Path" environment variable.
A web search for "configure windows path" will show you how.
Activated very_good_cli 0.3.0.

Show error

PS C:\Users\lkrja\AndroidStudioProjects> very_good
very_good : The term 'very_good' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ very_good
+ ~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (very_good:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\lkrja\AndroidStudioProjects>

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.2, on Microsoft Windows [Version 10.0.22000.71], locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.3)
[✓] Android Studio (version 4.1.0)
[✓] VS Code (version 1.58.2)
[✓] Connected device (3 available)

• No issues found!
@lkrjangid1 lkrjangid1 added the bug Something isn't working as expected label Jul 24, 2021
@felangel felangel self-assigned this Jul 24, 2021
@felangel
Copy link
Contributor

Hi 👋 @lkrjangid1
Thanks for opening an issue!

I’m guessing the issue is the pub cache isn’t part of your PATH. Check out https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path for more info and let me know if that helps 👍

@lkrjangid1
Copy link
Author

Not working

PS C:\Users\lkrja\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\very_good_cli-0.3.0> dart pub global deactivate very_good_cli
Deactivated package very_good_cli 0.3.0.
PS C:\Users\lkrja\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\very_good_cli-0.3.0> dart pub global activate very_good_cli
Resolving dependencies...
+ args 2.2.0
+ async 2.8.1
+ charcode 1.3.1
+ checked_yaml 2.0.1
+ collection 1.15.0
+ crypto 3.0.1
+ http 0.13.3
+ http_parser 4.0.0
+ io 1.0.3
+ json_annotation 4.1.0
+ mason 0.0.1-dev.45
+ meta 1.7.0
+ mustache_template 2.0.0
+ path 1.8.0
+ pedantic 1.11.1
+ recase 4.0.0
+ source_span 1.8.1
+ string_scanner 1.1.0
+ term_glyph 1.2.0
+ typed_data 1.3.0
+ universal_io 2.0.4
+ usage 4.0.2
+ very_good_analysis 2.1.2
+ very_good_cli 0.3.0
+ yaml 3.1.0
Precompiling executables...
Precompiled very_good_cli:very_good.
Installed executable very_good.
Warning: Pub installs executables into C:\Users\lkrja\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory to your system's "Path" environment variable.
A web search for "configure windows path" will show you how.
Activated very_good_cli 0.3.0.
PS C:\Users\lkrja\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\very_good_cli-0.3.0> dart pub global activate very_good_cli
Package very_good_cli is currently active at version 0.3.0.
Resolving dependencies...
The package very_good_cli is already activated at newest available version.
To recompile executables, first run `global decativate very_good_cli`.
Installed executable very_good.
Warning: Pub installs executables into C:\Users\lkrja\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory to your system's "Path" environment variable.
A web search for "configure windows path" will show you how.
Activated very_good_cli 0.3.0.
PS C:\Users\lkrja\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\very_good_cli-0.3.0> very_good
very_good : The term 'very_good' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ very_good
+ ~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (very_good:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\lkrja\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\very_good_cli-0.3.0>

@felangel
Copy link
Contributor

felangel commented Jul 24, 2021

@lkrjangid1 did you update your PATH? The error you shared indicates your PATH has not been updated:

Warning: Pub installs executables into C:\Users\lkrja\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory to your system's "Path" environment variable.
A web search for "configure windows path" will show you how.

@lkrjangid1
Copy link
Author

Yes
image

@felangel
Copy link
Contributor

Since updating your path have you restarted your terminal? If not, try exiting and reopening your terminal.

@lkrjangid1
Copy link
Author

Yes
image

@felangel
Copy link
Contributor

Can you try updating the PATH to be the exact path: C:\Users\lkrja\AppData\Local\Pub\Cache\bin ?

@lkrjangid1
Copy link
Author

still not working

@felangel
Copy link
Contributor

still not working

Does dart pub global run very_good work?

@lkrjangid1
Copy link
Author

PS C:\Users\lkrja\AndroidStudioProjects> dart pub global run very_good
No active package very_good.
PS C:\Users\lkrja\AndroidStudioProjects>

@felangel
Copy link
Contributor

PS C:\Users\lkrja\AndroidStudioProjects> dart pub global run very_good
No active package very_good.
PS C:\Users\lkrja\AndroidStudioProjects>

Make sure you’ve activated the package first
dart pub global activate very_good_cli

@lkrjangid1
Copy link
Author

PS C:\Users\lkrja\AndroidStudioProjects> dart pub global activate very_good_cli
Package very_good_cli is currently active at version 0.3.0.
Resolving dependencies...
The package very_good_cli is already activated at newest available version.
To recompile executables, first run `global decativate very_good_cli`.
Installed executable very_good.
Warning: Pub installs executables into C:\Users\lkrja\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory to your system's "Path" environment variable.
A web search for "configure windows path" will show you how.
Activated very_good_cli 0.3.0.
PS C:\Users\lkrja\AndroidStudioProjects> dart pub global run very_good
No active package very_good.
PS C:\Users\lkrja\AndroidStudioProjects>

@felangel
Copy link
Contributor

Can you try a regular command line rather than powershell? Seems like a pub configuration issue and doesn’t appear to be related to very_good_cli.

@lkrjangid1
Copy link
Author

working 😊

@atruby21
Copy link

atruby21 commented Jun 4, 2022

@lkrjangid1 how did you get this working? I'm having the same issue.

C:\Users\Anthony>dart pub global activate very_good_cli
Package very_good_cli is currently active at version 0.7.5.
Resolving dependencies...
The package very_good_cli is already activated at newest available version.
To recompile executables, first run `dart pub global deactivate very_good_cli`.
Installed executable very_good.
Warning: Pub installs executables into C:\Users\Anthony\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory to your system's "Path" environment variable.
A web search for "configure windows path" will show you how.
Activated very_good_cli 0.7.5.

C:\Users\Anthony>dart pub global run very_good
No active package very_good.

C:\Users\Anthony>very_good --help
'very_good' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Anthony>

env_variables

@arpit-d
Copy link

arpit-d commented Aug 30, 2022

Can you try a regular command line rather than powershell? Seems like a pub configuration issue and doesn’t appear to be related to very_good_cli.

It actually worked from me when I tried from powershell instead of regular command line.

@Kubwubuntu-Beracca
Copy link

Hello i'm using ubuntu 22.04 and I succefully installed very_good_cli.
But when i try to run very_good command i'm getting this error:
/home/nemidis/.pub-cache/bin/very_good: 8: dart: not found

Can some one give a help

@a-wallen
Copy link

a-wallen commented Mar 18, 2024

I've had the very_good_cli installed for a while now and it's done this to me a few times now.

For example: running very_good returns

The term 'very_good' is not recognized as the name of a cmdlet, function, script file, or operable
program

Then I run

dart pub global activate very_good_cli

to install it and I get the following message

The package very_good_cli is already activated at newest available version.

To solve:

  1. Make sure dart pub cache is added to your PATH C:\Users\<your_profile_name>\AppData\Local\Pub\Cache\bin
  2. Close and reopen any terminals including VSCode (it's not enough to just kill the terminal in VSCode, you have to close and reopen)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

6 participants