0

I was trying to create a project with angular dart, and I've activated webdev globally ad the documentation suggested by running "dart pub global activate webdev", but when I try to run "webdev server" it shows this error in console

Installed executable webdev.
Activated webdev 2.7.9.
macbook@Macbooks-MacBook-Pro ~ % webdev
**No active package webdev.**
macbook@Macbooks-MacBook-Pro ~ %

1 Answer 1

0

The dart pub global activate command installs the executable in ~/.pub-cache/bin, so make sure that is in your PATH:

export PATH=$HOME/.pub-cache/bin:$PATH

Alternatively, run it using the Dart command: dart pub global run webdev.

I've found the version of webdev that works is dependent on other packages that your project might be using. Therefore, it is better to include webdev in your pubspec.yaml file (under dev_dependencies so the desired version gets installed when dart pub get runs) and run it using dart run webdev. If you run the globally installed version, it might become incompatible with your project.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.