Open FrittenKeeZ opened 2 years ago
Same here with the svelte plugin.
---
name: Lint Code Base
on:
push:
branches: ['**']
pull_request:
branches: ['master']
jobs:
run-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Prettify code
uses: creyD/prettier_action@v4.2
with:
prettier_options: --write **/*.{html,js,css,md,svelte}
prettier_plugins: prettier-plugin-svelte
prettier_version: 2.8.1
Output is
with:
prettier_options: --write **/*.{html,js,css,md,svelte}
prettier_plugins: prettier-plugin-svelte
prettier_version: 2.8.1
commit_message: Prettified Code!
same_commit: false
file_pattern: *
dry: false
working_directory: false
only_changed: false
github_token: ***
Run PATH=$(cd $GITHUB_ACTION_PATH; npm bin):$PATH /home/runner/work/_actions/creyD/prettier_action/v4.2/entrypoint.sh
PATH=$(cd $GITHUB_ACTION_PATH; npm bin):$PATH /home/runner/work/_actions/creyD/prettier_action/v4.2/entrypoint.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
INPUT_COMMIT_MESSAGE: Prettified Code!
INPUT_COMMIT_DESCRIPTION:
INPUT_SAME_COMMIT: false
INPUT_COMMIT_OPTIONS:
INPUT_FILE_PATTERN: *
INPUT_PRETTIER_OPTIONS: --write **/*.{html,js,css,md,svelte}
INPUT_DRY: false
INPUT_PRETTIER_VERSION: 2.8.1
INPUT_ONLY_CHANGED: false
INPUT_PRETTIER_PLUGINS: prettier-plugin-svelte
INPUT_WORKING_DIRECTORY: false
INPUT_GITHUB_TOKEN: ***
Installing prettier...
Checking plugin: prettier-plugin-svelte
Prettifying files...
Files:
Error: Cannot find module 'prettier-plugin-svelte'
Error: Require stack:
Error: - /home/runner/work/_actions/creyD/prettier_action/v4.2/node_modules/prettier/index.js
Error: - /home/runner/work/_actions/creyD/prettier_action/v4.2/node_modules/prettier/cli.js
Error: - /home/runner/work/_actions/creyD/prettier_action/v4.2/node_modules/prettier/bin-prettier.js
Problem running prettier with --write **/*.{html,js,css,md,svelte}
Error: Process completed with exit code 1.
So it seems like the npm install --silent
in the entrypoint.sh
isn't working as intended. Possible privs issue or something maybe, so no plugins can be installed or something? Removing the --silent
will reveal all.
Is there any solution for this? For me it seems to be not installing daisyui
for Tailwind. I think the issue is that this Action only allows prettier plugins to be installed. If it allowed for other dependencies to be installed here, this bug could be fixed?
I will add an option for this with the next update. We could do it like this: "allow_other_plugins" which is default on false and you can switch it over to true to avoid the check. However I don't know if this actually fixes the issue.
What exactly happened? Using the workflow config below:
What should've happened? Tailwind dependency should be installed as expected.
How did it look?