Comments (10)
Still running into the same error with 0.22.2.
from prettierd.
@matthewswitzer thanks for confirming. I'll try to reproduce the setup/error later today.
from prettierd.
I think that was it. Running pkill prettierd
after upgrading seems to have fixed it. Thanks for your help!
from prettierd.
Hmm interesting. Are you able to provide full repro steps? I use macOS 12.5.1 and don't see this issue.
I'll try to trace the code to check whether we missed something in the integration with core_d.
from prettierd.
Sure, I'm cd
ing into an empty directory with this test file and running the steps below.
test.html
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/style.css" rel="stylesheet">
</head>
<body>
</body>
</html>
Steps to Reproduce
$ npm i @fsouza/[email protected]
$ cat test.html | npx prettierd test.html
TypeError: arg.startsWith is not a function
$ npm i @fsouza/[email protected]
$ cat test.html | npx prettierd test.html
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="css/style.css" rel="stylesheet" />
</head>
<body></body>
</html>
Version Information
os: macOS 12.5.1
node: v18.8.0
npm: 8.18.0
from prettierd.
🤔 this is weird. Which terminal emulator and shell are you using? I'll try to use the same setup to reproduce.
from prettierd.
I'm using iTerm 2 with zsh. Running it in terminal.app seems to be giving off the same error.
from prettierd.
I'm using iTerm 2 with zsh. Running it in terminal.app seems to be giving off the same error.
Thanks for confirming. I traced the code a bit and noticed something potentially related with how we disable colors. I fixed that and pushed 0.22.2. Can you give it a shot?
from prettierd.
@matthewswitzer any chance your daemon is old? You're likely using the new client with the older daemon. pkill prettierd
after the upgrade should fix it.
from prettierd.
To add more context: 0.22.1 changed the format of the data that is sent to the server, so if you're using the client on version 0.22.1 and the server on version 0.22.0, you're going to get that error.
It was totally my mistake to make a breaking change in a patch release, this should've been 0.23.0, but making the change did improve the tool overall.
Example on how to reproduce on any system:
% pkill prettierd
% npx --package @fsouza/[email protected] prettierd start
% echo "var x=1" | npx --package @fsouza/[email protected] prettierd file.js
from prettierd.
Related Issues (20)
- Support returning cursor offset HOT 1
- Not using configuration options from package.json like prettier does. HOT 2
- [Feature Request] Accept stdin or files with different extensions HOT 3
- Local configuration changes takes a long time to take effect HOT 5
- 0.23.* releases are not working with Neovim nor Zed HOT 4
- Enter insert mode ,exit insert mode,copy code indefinitely in Typescript. HOT 1
- `prettierd` doesn't seem to work after a new plugin is added to config file HOT 1
- There are processes running even after `prettierd stop` was executed HOT 1
- Overrides do not work in default config. HOT 5
- Does not respect `prefer-file`
- prettier 3.0 support HOT 1
- prettierd ignores .editorconfig file HOT 4
- v0.24.1 causes prettier to not follow project config HOT 5
- Add a test suite to catch regressions
- prettierd fails with prettier-plugin-astro HOT 2
- bug: The import statements are ordered when enabling the prettier formatter HOT 1
- Errors should be written to stderr not stdout HOT 8
- prettierd not reading the config file with tailwindcss plugin HOT 3
- The "list" argument must be an instance of Array. Received null HOT 13
- The process doesn't terminate HOT 6
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 prettierd.