Flutter Web Error

1,051 views
Skip to first unread message

Kamran Ali

unread,
May 11, 2019, 6:37:16 AM5/11/19
to Flutter Dev
while running webdev serve following error is showing.

PS D:\FlutterWeb\flutter_web-master\examples\hello_world> webdev serve
webdev : The term 'webdev' 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
+ webdev serve
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (webdev:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Tim Sneath

unread,
May 11, 2019, 7:40:43 PM5/11/19
to Flutter Dev
It needs to be in your path. See the instructions here:

Thanks for trying Flutter for web!

Kamran Ali

unread,
May 11, 2019, 9:09:28 PM5/11/19
to Tim Sneath, Flutter Dev
webdev serve command give me the following error
'dart' is not recognized as an internal or external command,
operable program or batch file.
'pub' is not recognized as an internal or external command,
operable program or batch file.
but when i try the following command it's working fine
flutter packages pub global run webdev serve
anyone know why webdev serve command is not working by the way Flutter web is awesome 😍


--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/646cb69c-569a-4ae7-8b44-a94e7aa869ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Danny Tuppeny

unread,
May 12, 2019, 1:51:40 PM5/12/19
to Flutter Dev
This is somewhat related to this issue. When you activate a package, that script that is written to Pub's bin folder calls "dart" without any path. This means it'll fail if Dart isn't also in your PATH.

To fix this you can add "(flutter sdk)/bin/cache/dart-sdk/bin/" to your PATH, or you could continue to use the flutter packages version of the command.

FWIW, if you're using the editors, you shouldn't need to run these commands manually (for example in VS Code you can just open a Flutter web project and press F5 and it should launch webdev in the background for you) 🙂

To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages