question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run prettierd run with a prettierrc configuration.

See original GitHub issue

Prettierd runs fine when I provide no .prettierrc.json, but when I add the file in my root I get the following error -

C:\Users\yashg\AppData\Local\nvim>prettierd test\foo.ts
TypeError [ERR_INVALID_ARG_TYPE]: The "list" argument must be an instance of Array. Received null
    at Function.concat (buffer.js:550:11)
    at Object.readFileAfterClose (internal/fs/read_file_context.js:51:23)
    at tick (internal/fs/read_file_context.js:105:28)
    at processTicksAndRejections (internal/process/task_queues.js:79:21) {
  code: 'ERR_INVALID_ARG_TYPE'
}

I am using Neovim in Windows along with efm-language-server My configuration of prettier looks like -

{formatCommand = "prettierd ${INPUT}", formatStdin = true}

Any idea?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
fsouzacommented, Jan 31, 2022

@jvmiert I’ll try to spin up a windows vm to investigate this. Sorry for the back and forth.

1reaction
jvmiertcommented, Jan 30, 2022
...\frontend\pages› prettierd.cmd .\login.tsx
TypeError [ERR_INVALID_ARG_TYPE]: The "list" argument must be an instance of Array. Received null
    at Function.concat (node:buffer:536:3)
    at Object.readFileAfterClose (node:internal/fs/read_file_context:56:23)
    at tick (node:internal/fs/read_file_context:115:9)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'ERR_INVALID_ARG_TYPE'
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

CLI - Prettier
Use the prettier command to run Prettier from the command line. To run your locally installed version of Prettier, prefix the command with...
Read more >
Unable to resolve custom configuration module #1289 - GitHub
It seems that version 4.0.0 released a few hours ago breaks importing/using custom Prettier configs. Downgrading to 3.20.0 fixes the issue. I ...
Read more >
How to configure Prettier and VSCode - Gleb Bahmutov
For example, the screenshot below shows that Prettier did not run because the project does not have Prettier configuration file like .prettierrc ......
Read more >
Prettier vscode extension ignoring config files - Stack Overflow
I set tabWidth to 1 in the .prettierrc file. When I run "npx prettier --write ." the prettier package properly formats the test.ts...
Read more >
Prettier | WebStorm Documentation - JetBrains
Run Prettier automatically on save · Open the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Languages & Frameworks | JavaScript | Prettier, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found