Skip to content

Plugin cannot be loaded when used as a global package #2391

Open
@trymeouteh

Description

@trymeouteh

When I install this plugin with the prettier package as a global npm package

npm install --global prettier @prettier/plugin-php

I am unable to use the PHP plugin to format PHP code. When I format a PHP file, I get the following error...

$ prettier ./index.php --write
[error] Cannot find package '@prettier/plugin-php' imported from /home/john/Documents/website/noop.js

Please allow developers to install the plugin globally and be able to use the plugin to format PHP files.

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