-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: arg.startsWith is not a function #397
Comments
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. |
Sure, I'm 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/prettierd@0.22.1
$ cat test.html | npx prettierd test.html
TypeError: arg.startsWith is not a function
$ npm i @fsouza/prettierd@0.22.0
$ 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 Informationos: macOS 12.5.1 |
🤔 this is weird. Which terminal emulator and shell are you using? I'll try to use the same setup to reproduce. |
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? |
Still running into the same error with 0.22.2. |
@matthewswitzer thanks for confirming. I'll try to reproduce the setup/error later today. |
@matthewswitzer any chance your daemon is old? You're likely using the new client with the older daemon. |
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:
|
I think that was it. Running |
Hello, I seem to be running into an issue with v0.22.1 on macOS 12.5.1. When trying to pass input through, it's reporting
TypeError: arg.startsWith is not a function
. This seems to be isolated to macOS only as 0.22.1 works fine on my Ubuntu 22.04 machine.Downgrading to v0.22.0 seems to run fine without any issues on macOS.
The text was updated successfully, but these errors were encountered: