Pub-dev: webdev can't run on Windows 10

Created on 4 Apr 2019  路  5Comments  路  Source: dart-lang/pub-dev

URL: https://pub.dartlang.org/packages/webdev/versions/2.0.0-alpha.1

My host machine can't run webdev, thought I have installed it:

pub global activate webdev
Package webdev is currently active at version 1.0.1.
Resolving dependencies...

  • args 1.5.1
  • charcode 1.1.2
  • collection 1.14.11
  • io 0.3.3
  • meta 1.1.7
  • path 1.6.2
  • pub_semver 1.4.2
  • source_span 1.5.5
  • stack_trace 1.9.3
  • string_scanner 1.0.4
  • term_glyph 1.1.0
  • webdev 1.0.1 (2.0.0-alpha.1 available)
  • yaml 2.1.15
    Precompiling executables...
    Precompiled webdev:bin\webdev.
    Activated webdev 1.0.1.

webdev
'webdev' is not recognized as an internal or external command,
operable program or batch file.

Most helpful comment

Oh, pub global run <package> usually also works.

All 5 comments

This seems like an issue related to webdev or pub command, see:

But assuming you're on windows, you probably just didn't setup your PATH environment variable.

If you found instructions somewhere that doesn't link: https://www.dartlang.org/tools/pub/cmd/pub-global#running-a-script-from-your-path

Maybe file a PR for that to be referenced.

Oh, pub global run <package> usually also works.

Thanks for Jonasfj, this command is working on Window 10

pub global run webdev serve
webdev could not run for this project.
You must have a dependency on build_runner in pubspec.yaml.

pubspec.yaml

dev_dependencies:
build_runner: >=0.8.10 <2.0.0
You must have a dependency on build_web_compilers in pubspec.yaml.

pubspec.yaml

dev_dependencies:
build_web_compilers: >=0.3.6 <2.0.0

Faced similar issues, running flutter pub global run webdev serve seems to work. Thanks @jonasfj for the suggestion

pub.bat global run webdev serve
worked for me under windows 10

Was this page helpful?
0 / 5 - 0 ratings