apheleia
apheleia copied to clipboard
Failed to run apheleia-npx: exit status 1 (see buffer *apheleia-apheleia-npx-log*)
I am experiencing an issue with this package in my ruby on rails project.
I am using doom emacs - latest pinned version, which is 96a9805ecb75aac2adde7568d26b3e3b3ffc19af
.
🐛 Whenever I save a file, I get this error message in the messages buffer:
Failed to run apheleia-npx: exit status 1 (see buffer *apheleia-apheleia-npx-log*)
And this is what that buffer tells me:
$ apheleia-npx prettier --stdin-filepath /Users/cedricdelalande/dev/stockpro/stockpro-api/app/models/order/es_search.rb --plugin\=\@prettier/plugin-ruby --parser\=ruby
[error] Cannot find package '@prettier/plugin-ruby' imported from /Users/cedricdelalande/dev/stockpro/stockpro-api/noop.js
Command succeeded with exit code 1.
I have a node_modules
directory, but I do not want to touch package.json
as dependencies are a bit touchy on this project.
I did try to install @prettier, etc. locally, but when I did, what I got was another error:
apheleia-npx prettier --stdin-filepath /Users/cedricdelalande/dev/stockpro/stockpro-api/app/models/order/es_search.rb --plugin\=\@prettier/plugin-ruby --parser\=ruby
[error] /Users/cedricdelalande/dev/stockpro/stockpro-api/app/models/order/es_search.rb: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
[error] at validateString (node:internal/validators:162:11)
[error] at Object.dirname (node:path:1279:5)
[error] at spawnServer (file:///Users/cedricdelalande/dev/stockpro/stockpro-api/node_modules/@prettier/plugin-ruby/src/plugin.js:79:24)
[error] at async parse (file:///Users/cedricdelalande/dev/stockpro/stockpro-api/node_modules/@prettier/plugin-ruby/src/plugin.js:154:27)
[error] at async parse4 (file:///Users/cedricdelalande/dev/stockpro/stockpro-api/node_modules/prettier/index.mjs:22117:11)
[error] at async coreFormat (file:///Users/cedricdelalande/dev/stockpro/stockpro-api/node_modules/prettier/index.mjs:22607:7)
[error] at async formatWithCursor (file:///Users/cedricdelalande/dev/stockpro/stockpro-api/node_modules/prettier/index.mjs:22809:14)
[error] at async formatStdin (file:///Users/cedricdelalande/dev/stockpro/stockpro-api/node_modules/prettier/internal/cli.mjs:6587:23)
[error] at async main (file:///Users/cedricdelalande/dev/stockpro/stockpro-api/node_modules/prettier/internal/cli.mjs:7077:5)
[error] at async Module.run (file:///Users/cedricdelalande/dev/stockpro/stockpro-api/node_modules/prettier/internal/cli.mjs:7027:5)
Command succeeded with exit code 2.
I read through the README to see if I had overlooked some installation step, but I cannot see anything relevant...