Closed angrybacon closed 1 year ago
For the time being I'm using this to use the version from the fork:
(straight-use-package
'(prettier :pre-build (("npm" "install" "--frozen-lockfile") ("make" "dist/prettier-el.js.gz.base64") ("bash" "-c" "cp ./dist/* .")) :files (:defaults "*.js" "dist/*.base64" "prettier-pkg.el") ;; https://github.com/radian-software/straight.el/issues/621#issuecomment-716221459
:repo "asbish/prettier.el" :branch "support-for-prettier3" ) ;; https://github.com/jscheid/prettier.el/pull/124
)
@kuba-orlik What is the 'use-package' with ':straight' version of your command?
I ask because I don't personally use 'straight.el' to manage packages, and just grab the latest stable packages from MELPA with my Emacs config.
Trying to use Prettier, but I'm getting the same exact 'TypeError: n.resolveConfig.sync is not a function' error after attempting to save a Typescript buffer with the 'Prettier.el' package.
@kuba-orlik Nevermind, it seems like you would need 'Straight.el' installed to even get access to install a specific GitHub repo version of a package for a scenario like this.
Probably will just hold off from using this until this gets fixed in the main branch of this project.
I notice only now there's already a PR for it https://github.com/jscheid/prettier.el/pull/124
Thanks!
Describe the bug
Prettier v3 has some breaking changes: https://prettier.io/blog/2023/07/05/3.0.0.html#api-1
Link to
M-x prettier-info
outputTo Reproduce
"prettier": "3.0.0"
prettier-mode
.json
,.ts[x]
file)*prettier-errors*
and the file not prettifiedExpected behavior
The file should be prettified with no error.
Additional context
I'm not sure what the relevant part of
prettier.el
are so let me know if more clues are necessary.Downgrading to v2.8.8, then restarting the
prettier
process removes the error on save with no surprise.