Skip to content

Resolving prettier dependency #1

@adekbadek

Description

@adekbadek

Due to issue with dependency resolving, you might end up a different version of prettier in project's node_modules and node_modules/newspack-scripts/node_modules.
To fix this and make newspack-scripts use to "root" version of prettier, remove the offending prettier version in a postinstall hook script:

"postinstall": "rm -rf node_modules/newspack-scripts/node_modules/prettier"

This might be caused by version resolving being thrown off by aliasing prettier to wp-prettier as npm:[email protected].

Technically it seems like the overrides option should take care of that, but I did not have any luck with using it.

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