Giter Club home page Giter Club logo

Comments (8)

jonlabelle avatar jonlabelle commented on May 29, 2024 1

I really need to change (or add) the "node_path" variable name to read "prettier_path"... since the prettier executable resolves the path internally to node. Except for cases when installing prettier locally, in the Sublime Text Package directory.

@rawcreative: try changing the node_path in your user settings to the path where the prettier cli resides.

from sublimejsprettier.

rawcreative avatar rawcreative commented on May 29, 2024

Same result.. prettier is installed globally so it's in the same bin dir as node, i.e. the setting is the same. But it looks like it's just not even reading the settings file since it's saying that the node_path variable getting passed to isdir() is None, which is set here: https://github.com/jonlabelle/SublimeJsPrettier/blob/master/JsPrettier.py#L127

from sublimejsprettier.

rawcreative avatar rawcreative commented on May 29, 2024

After looking at the code again, I noticed that the node_path is never actually set if it's defined in the settings file, and even the defaults don't get set if node_path is set to anything other than false in the settings (the default is just an empty string). There are checks to see if it is defined, but it doesn't actually assign the defined value to the node_path variable. https://github.com/jonlabelle/SublimeJsPrettier/blob/master/JsPrettier.py#L138-L141

from sublimejsprettier.

jonlabelle avatar jonlabelle commented on May 29, 2024

@rawcreative: I just promoted v1.1.0. Let me know if this resolves your issue.

from sublimejsprettier.

rawcreative avatar rawcreative commented on May 29, 2024

Nope, while it looks like it's finding the prettier cli binary, for whatever reason it's throwing an env error that node cannot be found:

env: node: No such file or directory

from sublimejsprettier.

jonlabelle avatar jonlabelle commented on May 29, 2024

Closing. since it directly relates to #5... and #5 comes before #6.

from sublimejsprettier.

lock avatar lock commented on May 29, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from sublimejsprettier.

jonlabelle avatar jonlabelle commented on May 29, 2024

See solution.

from sublimejsprettier.

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.