Stillat / vscode-antlers-language-server

Provides rich language features for Statamic's Antlers templating language, including code completions, syntax highlighting, and more.
https://antlers.dev
MIT License
36 stars 3 forks source link

Github actions fails #60

Closed Oleafeon closed 1 year ago

Oleafeon commented 1 year ago

Describe the bug When implementing this plugin i came to the problem that the my github actions fails this is the log that i get

Error:  Cannot find module '/home/runner/work/simons-halal-food/simons-halal-food/node_modules/prettier-plugin-antlers'
Error:  Require stack:
Error:  - /home/runner/.npm/_npx/b3886546[7](https://github.com/Appart-Media/simons-halal-food/actions/runs/4192636378/jobs/7268466117#step:3:8)8d519d9/node_modules/prettier/index.js
Error:  - /home/runner/.npm/_npx/b3[8](https://github.com/Appart-Media/simons-halal-food/actions/runs/4192636378/jobs/7268466117#step:3:9)8654678d519d9/node_modules/prettier/cli.js
Error:  - /home/runner/.npm/_npx/b388654678d51[9](https://github.com/Appart-Media/simons-halal-food/actions/runs/4192636378/jobs/7268466117#step:3:10)d9/node_modules/prettier/bin-prettier.js
Error: Process completed with exit code 1.

Impacted Products Which Antlers Toolbox products does this bug apply to?

Versions and Other Plugins/Extensions

    "autoprefixer": "^10.4.8",
    "browser-sync": "^2.27.10",
    "browser-sync-webpack-plugin": "^2.3.0",
    "cross-env": "^7.0",
    "husky": "^8.0.1",
    "lint-staged": "^13.0.3",
    "postcss": "^8.4.16",
    "postcss-import": "^14.1.0",
    "prettier": "^2.7.1",
    "prettier-plugin-antlers": "^1.1.23",
    "prettier-plugin-tailwindcss": "^0.1.13",
    "resolve-url-loader": "^5.0.0",
    "sass": "^1.54.6",
    "sass-loader": "^13.0.2",
    "stylelint": "^14.11.0",
    "stylelint-config-prettier-scss": "^0.0.1",
    "stylelint-config-standard-scss": "^5.0.0",
    "tailwindcss": "^3.1.8",
    "vue-template-compiler": "^2.7.10"
JohnathonKoster commented 1 year ago

Thanks!

I'll have to look into how to get the plugin noticed without the configuration file mapping the plugin/file extension. Hopefully won't be too long 🙂

Oleafeon commented 1 year ago

allright thank you

Oleafeon commented 1 year ago

@JohnathonKoster Did you have a change to get this working?

JohnathonKoster commented 1 year ago

I have not yet - will make a note to dig into it this week

JohnathonKoster commented 1 year ago

Do you have an example of the GitHub action you are running? Thanks!

Oleafeon commented 1 year ago

@JohnathonKoster yes here you go

name: Code style checks

on: pull_request: branches:

jobs: code-style-checks: name: Code style checks runs-on: ubuntu-latest

steps:
  - name: Checkout the branch
    uses: actions/checkout@v3
    with:
      ref: ${{ github.head_ref }}

  - name: Checking HTML code
    uses: creyD/prettier_action@v4.3
    with:
      prettier_options: --check ./resources
JohnathonKoster commented 1 year ago

Thanks for the sample. After debugging and experimenting, this is the same issue as described here:

https://github.com/creyD/prettier_action/issues/110

Removing the plugins array from the .prettierrc.json file works, but is likely not ideal for setups in editors. Was able to replicate this using both the prettier-plugin-antlers and prettier-plugin-tailwindcss plugins independently.