Tom3652
Tom3652

Reputation: 2957

No active package dartdoc Flutter

I am trying to generated the documentation of my flutter app and the dartdoc command is not working as expected.

I have tried :

flutter pub global deactivate dartdoc 
flutter pub global activate dartdoc 

The output is :

Resolving dependencies...
+ _fe_analyzer_shared 31.0.0
+ analyzer 2.8.0
+ args 2.3.0
+ async 2.8.2
+ charcode 1.3.1
+ cli_util 0.3.5
+ collection 1.15.0
+ convert 3.0.1
+ crypto 3.0.1
+ csslib 0.17.1
+ dartdoc 4.1.0
+ file 6.1.2
+ glob 2.0.2
+ html 0.15.0
+ logging 1.0.2
+ markdown 4.0.1
+ meta 1.7.0
+ package_config 2.0.2
+ path 1.8.0
+ pub_semver 2.1.0
+ source_span 1.8.1
+ string_scanner 1.1.0
+ term_glyph 1.2.0
+ typed_data 1.3.0
+ watcher 1.0.1
+ yaml 3.1.0
Installed executable dartdoc.
Warning: Executable "dartdoc" runs "bin/dartdoc.dart", which was not found in dartdoc.
Warning: Pub installs executables into $HOME/Desktop/flutter/.pub-cache/bin, which is not on your path.
You can fix that by adding this to your shell's config file (.bashrc, .bash_profile, etc.):

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

Activated dartdoc 4.1.0.

I have also added to my PATH the export suggested.

Now when i run the dartdoc command in my flutter app root directory , here is the output :

No active package dartdoc.

I have also tried to do a flutter pub cache repair but it didn't help.

What else can i do to make it work please ?

Note : It was working before i upgrade to flutter 2.8

Upvotes: 4

Views: 1790

Answers (1)

I also experienced this problem. In my case, I managed to solve it running:

dart pub global activate dartdoc

Instead of:

flutter pub global activate dartdoc

Upvotes: 13

Related Questions