Git Product home page Git Product logo

Comments (10)

matthewswitzer avatar matthewswitzer commented on May 22, 2024 1

Still running into the same error with 0.22.2.

from prettierd.

fsouza avatar fsouza commented on May 22, 2024 1

@matthewswitzer thanks for confirming. I'll try to reproduce the setup/error later today.

from prettierd.

matthewswitzer avatar matthewswitzer commented on May 22, 2024 1

I think that was it. Running pkill prettierd after upgrading seems to have fixed it. Thanks for your help!

from prettierd.

fsouza avatar fsouza commented on May 22, 2024

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.

matthewswitzer avatar matthewswitzer commented on May 22, 2024

Sure, I'm cding 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.

fsouza avatar fsouza commented on May 22, 2024

🤔 this is weird. Which terminal emulator and shell are you using? I'll try to use the same setup to reproduce.

from prettierd.

matthewswitzer avatar matthewswitzer commented on May 22, 2024

I'm using iTerm 2 with zsh. Running it in terminal.app seems to be giving off the same error.

from prettierd.

fsouza avatar fsouza commented on May 22, 2024

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.

fsouza avatar fsouza commented on May 22, 2024

@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.

fsouza avatar fsouza commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.