Skip to content

[BUG] Cannot find module 'prettier-plugin-tailwindcss' #111

Open
@andershagbard

Description

@andershagbard

The following workflow gives this error:

...
Installing prettier...
Checking plugin: prettier-plugin-tailwindcss
Checking plugin: @shopify/prettier-plugin-liquid
Prettifying files...
Files:
Error:  Cannot find module 'prettier-plugin-tailwindcss'
Error:  Require stack:
Error:  - /runner/_work/_actions/creyD/prettier_action/v4.2/node_modules/prettier/index.js
Error:  - /runner/_work/_actions/creyD/prettier_action/v4.2/node_modules/prettier/cli.js
Error:  - /runner/_work/_actions/creyD/prettier_action/v4.2/node_modules/prettier/bin-prettier.js
Problem running prettier with --write .
Error: Process completed with exit code 1.

Workflow

name: Format

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  run-prettier:
    runs-on: self-hosted
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          ref: ${{ github.head_ref }}
          fetch-depth: 0

      - name: Prettify code
        uses: creyD/prettier_action@v4.2
        with:
          prettier_plugins: "prettier-plugin-tailwindcss @shopify/prettier-plugin-liquid"
          prettier_options: --write .
          only_changed: True

.prettierrc.json

{
  "printWidth": 100,
  "singleQuote": true,
  "plugins": ["prettier-plugin-tailwindcss"],
  "overrides": [
    {
      "files": ["**/*.liquid"],
      "options": {
        "singleQuote": false
      }
    }
  ]
}

Not sure how to proceed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions