Here the activation command
flutter pub global activate get_cli
Here the create new project command
get create project:getcli_test
maybe it's too late
it's my solution
after com.yourcompany,
CTRL + Z and enter to continue
create project manually over flutter by using create project
after finished, open terminal and write get init
and
wait a moment
and your project now already configured with get cli
Run these commands
1.flutter pub global deactivate get
2.flutter pub global deactivate getx
3.dart pub global activate get_cli ^1.6.0
Related
I want to write a script to call flutter_gen package from CLI using fluttergen -c pubspec.yaml command. But the only way I know to do it is run dart pub global activate flutter_gen firstly.
This approach requires the user of my script to ensure that /.pub-cache/bin directory is added to PATH. To prevent such extra work, I want to find a way to run it "locally" (i.e. without global activation).
For know I use this bad workaround:
dart pub global activate flutter_gen
fluttergen -c pubspec.yaml
dart pub global deactivate flutter_gen
How can I run fluttergen -c pubspec.yaml command without dart pub global activate flutter_gen command?
I want to install get_cli but when running the command below, error is found
flutter pub global activate get_cli
the error
Warning: Executable "get" runs "bin/get.dart", which was not found in get_cli.
Warning: Executable "getx" runs "bin/get.dart", which was not found in get_cli.
I have entered the path below to the environment
export PATH="$PATH":"$HOME/.pub-cache/bin"
You can downgrade to 1.6.0 with
dart pub global deactivate get_cli
dart pub global activate get_cli 1.6.
Ref Github Issue
Explanation of error occurred due to this reason=>
// to install get_cli 1.6.0 version for proper working instead of get_cli^1.7.1
//first of all deactivate get, getx version of 1.7.1 then install get_cli ^1.6.0
Do the steps
step=1>
flutter pub global deactivate get
Step=2>
flutter pub global deactivate gets
step=3>
dart pub global activate get_cli ^1.6.0
//this will surely help you if you follow these steps
it show essay
Get CLI
Install it
You can install the package from the command line:
dart pub global activate get_cli
ya
flutter pub global activate get_cli
if you use cmd to install getcli
if you install Get_Cli using cmd thenafter installtion in cmd you show
Pub installs executables into C:\Users\USERNAME\AppData\Local\Pub\Cache\bin
that path set system variables in PATH add new PATH veriable PATH
if you use other terminal then after installesion go your file maneger
C:\Users\USERNAME\AppData\Local\Pub\Cache\bin
go and check it after copy that path and create new system verible as normal.
dart pub global activate get_cli
Flutter Pub get automatically pops-up and start getting packages. After finishing, it starts again doing the same.
Like we save pubspac.yaml in vscode then dart plugin automatically runs Flutter pub get automatically.
my answer in vs code
steps:
open extension (ctrl + shift + x)
open dart extension
click on the setting icon next to uninstall button
click on extension settings in the menu
search pub get
Dart: Run Pub Get On Pubspec Changes : make it never
Reason : I think you have keep open the pubspec.yaml on vscode, that is why it's keep performing pub get again & again.
Solution : You can close the pubspec.yaml after editing it.
im trying to install the get_cli package for flutter.
install command is pub global activate get_cli, however pub is not a global variable on my windows 10 machine.
i think i need to add variables to the system environment variables, but i'm not sure what paths and how to call them.
this answer works for unix, so im looking for something similar for windows.
anyone got an idea?
edit: error: 'pub' is not recognized as an internal or external command, operable program or batch file.
If you have Flutter in C:\src\flutter, you can add path variable: C:\src\flutter\bin\cache\dart-sdk\bin (if you have Flutter in another localization, just replace the beginning of the path analogically) and restart your command line tool (or IDE).
You can add flutter prefix before pub as well: flutter pub global activate get_cli - according to flutter -h:
flutter pub - pass the remaining arguments to Dart's "pub" tool
Use dart pub not pub only and it should resolve your problem
enjoy
use flutter pub and make sure the path variable is C:\flutter\bin supposing the Flutter folder is located at C:\flutter
make sure you set the environment variables correctly.After that don't forget to restart the computer. I struggled with this issue for a long time but after doing all these things a magic code worked for me . Which you guys can also try.
dart pub global activate get_cli
then use
flutter pub global activate get_cli
this should work .
I created a new Angular Dart project from IntelliJ but when I try to run the project I get the following output:
/usr/local/opt/dart/libexec/bin/pub global run webdev serve web:61889
No active package webdev.
Dart Dev Server terminated
Is there something I still need to install?
You first need to run
pub global activate webdev
as mentioned in https://pub.dartlang.org/packages/webdev