Skip to content

🐛 BUG: Does not work using global install of prettier-plugin-astro #453

@6543

Description

@6543

Describe the Bug

I have "prettier-plugin-astro" installed only globally (via "npm install -g prettier-plugin-astro") instead of within the local package.

same as #258 (closed but never solved :/)

I want the plugin to be found and used in linux if globally installed.
As it is needed for the CI plugin https://codeberg.org/woodpecker-plugins/prettier/issues/39#issuecomment-9719612

Steps to Reproduce

  1. clone https://codeberg.org/koibtw/ebil.club
  2. docker run --rm -it -v $(pwd):/work --workdir /work -e PLUGIN_CHECK=true -e PLUGIN_PLUGINS=prettier-plugin-sh,prettier-plugin-astro --entrypoint /bin/sh codeberg.org/woodpecker-plugins/prettier
  3. exec /entrypoint.sh to get the intended usage of the plugin (this will pnpm install --global prettier-plugin-astro and run prettier in check mode
  4. [error] Cannot find package 'prettier-plugin-astro' imported from /work/noop.js

as the plugin e.g. environment should not alter the work dir we can not locally install the plugin witch would work:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions