byrnereese/mkdocs-minify-plugin

The minify plugin is not installed

Closed this issue · 5 comments

Hi, I'm working on my virtual environment. I already installed mkdocs and the required plugins, but when I run mkdocs serve I get the error:

ERROR    -  Config value 'plugins': The "minify" plugin is not installed
Aborted with 1 Configuration Errors!

But it is already installed.


When I do a pip list in my environment:

mkdocs                                    1.4.2
mkdocs-git-revision-date-localized-plugin 1.1.0
mkdocs-material                           8.5.9
mkdocs-material-extensions                1.1
mkdocs-minify-plugin                      0.6.1

My config mkdocs.yml file is:

plugins:
  - minify
  - search:
      lang:
        - en
  - git-revision-date-localized:
      type: date

If I change the order of the plugins I get the same error but for the git-revision-date-localized plugin.

Any ideas? I'm on Windows 10 64-bit

  • Python version: 3.10.0
  • pip version: 22.3.1
  • MkDocs v1.4.2

Thanks in advance!

Works for me with the exact same versions of the plugins installed and the exact same plugins entry. Could you provide the full mkdocs.yml?

(I always put search at the top of the plugins list, because that's a built-in plugin. But even if I don't, it works for me.)

I can provide this fragment:

# Configuration
theme:
  name: material
  custom_dir: material
  # 404 page
  static_templates:
    - 404.html
  # Don't include MkDocs' JavaScript
  include_search_page: false
  search_index_only: true
  # Default values, taken from mkdocs_theme.yml
  language: en
  features:
    - tabs
    #- instant
  palette:
    scheme: default
  font:
    text: Roboto
    code: Roboto Mono
  icon:
    logo: logo
  favicon: assets/images/favicon.png
  #site_favicon: assets/images/favicon.png


# Extensions
markdown_extensions:
  - markdown.extensions.admonition
  - markdown.extensions.attr_list
  - markdown.extensions.codehilite:
      guess_lang: false
  - markdown.extensions.def_list
  - markdown.extensions.footnotes
  - markdown.extensions.meta
  - markdown.extensions.toc:
      permalink: true
  - pymdownx.arithmatex
  - pymdownx.betterem:
      smart_enable: all
  - pymdownx.caret
  - pymdownx.critic
  - pymdownx.details
  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji
      emoji_generator: !!python/name:materialx.emoji.to_svg
        # - pymdownx.highlight:
      #     linenums_style: pymdownx-inline
  - pymdownx.inlinehilite
  - pymdownx.keys
  - pymdownx.magiclink:
      repo_url_shorthand: true
      user: squidfunk
      repo: mkdocs-material
  - pymdownx.mark
  - pymdownx.smartsymbols
  - pymdownx.snippets:
      check_paths: true
  - pymdownx.superfences
  - pymdownx.tabbed
  - pymdownx.tasklist:
      custom_checkbox: true
  - pymdownx.tilde


plugins:
  - search:
      lang:
        - en
  - minify
  - git-revision-date-localized:
      type: date

extra_css:
  - stylesheets/extra.css

extra_javascript:
  - javascripts/extra.js

I'm starting to think it's due to my virtual environment.

(my-virtual-env) $ pip --version
pip 22.3.1 from C:\MyProjectFolder\lib\site-packages\pip (python 3.10)
(my-virtual-env) $ mkdocs --version
mkdocs, version 1.4.2 from C:\Program Files\Python310\lib\site-packages\mkdocs (Python 3.10)

Is it possible to run mkdocs serve pointing at the virtual environment folder?
Could be this the problem?

Thank you!

I don't have any experience with virtualenv, but yes, it looks like your plugins are installed in multiple folders.

I'd try uninstalling all relevant plugins via pip uninstall and then reinstall them so they all get installed in the same folder.

Hi, sorry I forgot to close the issue. It was finally a problem with my environment, after I did a python -m mkdocs serve inside my new environment everything was working fine.

Thanks a lot!