Filter by Widgets


Dart: Unable to run Pub Commands on Windows

This Article is posted by seven.srikanth at 04-03-2019 19:27:19


If you are unable to run Pub Commands after installing dart sdk, the probably you are missing the below steps. Please follow the below instructions to get it fixed.
Add the below 2 Environment variable 
1) %APPDATA%\Pub\Cache\bin - Verify if the path has got stagehand.exe file.
2) C:\src\flutter\bin\cache\dart-sdk\bin - Verify if the path has got the dart.exe file.
Most of you must be already aware of what I'm going to do with this. Below is the screenshot of how your environmental variable is going to look. 
Explanation here,
The first path is where you find the stagehand file. And in the second path, you will find the dark.exe file. The second path may change in your case depending on where you extracted the flutter SDK.
In order to set the environment variable, you have to follow the below steps.
1) Open Control Panel.
2) Click on System.
3) On Left-hand side, click on Advanced system settings.
4) Go to Advanced Tab.
5) Click on Environment Variable button.
6)  Select Path from the top list and Edit.
7) Click New again and key in the Paths. Repeat it twice.
That's it. Now you will be able to run the Pub Commands on your Windows machine.
Thanks,
Srikanth
0 Comments
Login to comment.
Recent Comments

Be the first to Comment. You can ask a Query or Share your toughts or Just say thanks.




Recent articles

Error: The name 'RangeSlider' is defined in the libraries 'package:flutter/src/material/range_slider.dart' and 'package:flutter_range_slider/src/flutter_range_slider.dart'.

Check out this article on Error: The name 'RangeSlider' is defined in the libraries 'package:flutter/src/material/range_slider.dart' and 'package:flutter_range_slider/src/flutter_range_slider.dart'.

Read full post

How to create a persistent bottom sheet in Flutter?

Check out this article on How to create a persistent bottom sheet in Flutter?

Read full post

How to draw a Decorative Horizontal line in Flutter?

Check out this article on How to draw a Decorative Horizontal line in Flutter?

Read full post

How to fetch an Image from Internet in Flutter

Check out this article on How to fetch an Image from Internet in Flutter

Read full post

ListView with Images from the Internet

Check out this article on ListView with Images from the Internet

Read full post

How to show Tooltip in Flutter?

Check out this article on How to show Tooltip in Flutter?

Read full post

How to create BottomNavigationBar in flutter?

Check out this article on How to create BottomNavigationBar in flutter?

Read full post

How to add actions to Appbar?

Check out this article on How to add actions to Appbar?

Read full post

How to open dart devtools in VS code?

Check out this article on How to open dart devtools in VS code?

Read full post

Accessibility features in flutter

Check out this article on Accessibility features in flutter

Read full post

© 2018 - Fluttercentral | Email to me - Seven.srikanth@gmail.com

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License , and code samples are licensed under the BSD License.