Comments (8)
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.
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.
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.
@rawcreative: I just promoted v1.1.0. Let me know if this resolves your issue.
from sublimejsprettier.
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.
Closing. since it directly relates to #5... and #5 comes before #6.
from sublimejsprettier.
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.
See solution.
from sublimejsprettier.
Related Issues (20)
- Unexpected output when using `prettier-plugin-tailwindcss` + `daisyUI` HOT 3
- Allow for disabling default Prettier options HOT 2
- JsPrettier using html parser instead of svelte HOT 4
- [Question] Auto formatting not triggering HOT 4
- `.prettierignore` is not honored correctly HOT 2
- auto_format_on_save doesn't work with prettier-php, but my manual keybind does. HOT 2
- Saving a php document with cursor inside a script tag causes cursor to jump to top of document HOT 2
- Svelte support + bug HOT 4
- JsPrettier’s parser detection interferes with the Liquid Prettier plugin HOT 3
- Fails to work with ruby files using @prettier/plugin-ruby HOT 2
- Allow unsaved files to be formatted with prettier without saving HOT 4
- SyntaxError: Invalid or unexpected token HOT 6
- Problem formatting .svelte files HOT 3
- Add Support For ESLinter Configurations HOT 2
- Support not passing any Prettier config CLI options even when *not* using a Prettier config file HOT 3
- Crash when low on memory HOT 2
- JsPrettier cannot find plugin HOT 5
- Switch to `--log-level` Prettier CLI option name is needed HOT 2
- Prettier cannot find plugin HOT 6
- [Question] I could not format css, json... HOT 7
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 sublimejsprettier.