Comments (12)
from prettier_action.
Getting similar issue here, v.4.3.
Run creyD/[email protected]
Run PATH=$GITHUB_ACTION_PATH/node_modules/.bin:$PATH /home/runner/work/_actions/creyD/prettier_action/v4.3/entrypoint.sh
Installing prettier...
Checking plugin: @prettier/plugin-php
Error: Process completed with exit code 1.
from prettier_action.
This is caused by breaking changes in prettier v3. Use the prettier_version
option to pin the prettier version to 2.x.x.
from prettier_action.
This is caused by breaking changes in prettier v3. Use the
prettier_version
option to pin the prettier version to 2.x.x.
Thanks! It works with Prettier 2.8.8, which was the last version before 3.0.
Do you think this is an issue with prettier or the prettier-php plugin? I can try raising the issue at the appropriate place.
from prettier_action.
Run prettier v3 on your own source files first before looking to raise an issue elsewhere.
from prettier_action.
Pinning prettier at version 2.8.8 has solved my issues, which looked like this when prettyfying solidity:
Error: No parser could be inferred for file "[...]".
from prettier_action.
This worked for a while but now I'm getting the same error again even after pinning Prettier to version 2.8.
Does anyone have any workarounds or suggestions for fixing this?
from prettier_action.
@rwrj If your prettier plugins have been updated to support Prettier v3+, then you either have to pin them too, or unpin Prettier. In the end, make sure you know exactly which versions of Prettier and your plugins are running on this Github workflow and using those versions replicate the issue on your localhost. Then you'll know what to do.
from prettier_action.
@igitur Yes, it's possible that the PHP plugin has been updated. I tried unpinning Prettier but that didn't work either. How can I pin the version of prettier/plugin-php to 0.19.7? This seems to be the last version working with prettier 2.x - https://github.com/prettier/plugin-php/releases/tag/v0.19.7
I'm sorry if this is a silly question but I can't figure out how to set the version of the plugin in the workflow config.
I've tried running this on my localhost and seem to be getting the same error but I'm not sure if I'm doing something else wrong there - I haven't worked much with node / npm before.
from prettier_action.
@rwrj Specify the plugin npm package in this format: [email protected]
. To be honest, if you haven't used node / npm much before, you should upskill yourself on that first. ChatGPT is a great help.
from prettier_action.
@igitur I got this set up and the Prettier PHP plugin is working fine on my local machine (Ubuntu 22.04 - which should be the same version being used in the GitHub Action)
It's running Prettier v3.0.3
ChatGPT was a great suggestion, I was struggling getting things to work from the Prettier docs.
Any suggestions on how to proceed from here? Could this possible be an issue with the version of node being run? I see this warning on the GitHub Actions page with the failed run:-
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
from prettier_action.
Update: This error seems to be gone now when running on the latest version of Prettier, however it gives the error No parser could be inferred for file "/home/runner/work/.../*.php".
for each PHP file.
from prettier_action.
Related Issues (20)
- [BUG] Problem running prettier in workflow HOT 5
- [BUG] Doesn't fail on infer parser failed HOT 4
- [BUG] Shouldn't delete node_modules HOT 8
- [BUG] Actions Fails to install/use modules - Cannot find module '@prettier/plugin-php'
- [BUG] Cannot find module 'prettier-plugin-tailwindcss' HOT 11
- [BUG] `prettier` not installed correctly HOT 9
- [BUG] prettier: command not found HOT 3
- [BUG] Problem --writer HOT 4
- [BUG] Process completed with exit code 1 HOT 5
- [BUG] Example not working. HOT 4
- IDEA: Add push_options parameter HOT 3
- [BUG] Code style issues found, can't reproduce locally HOT 2
- [FEATURE] Format only changed lines not the whole file HOT 1
- [BUG] Should work when package-lock.json is not versioned HOT 3
- [FEATURE] Don't log unchanged files
- [BUG] Dry run fails in spite of the fact that a line length does not exceed 80 chars. HOT 2
- What is status code 128? HOT 5
- Readme out of date
- [FEATURE] Print the `prettier` command to be executed before executing it
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettier_action.