-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
"prettier errors: env: node: No such file or directory" #63
Comments
i get same error |
I found this issue in NVM repository. I tried I am not sure why emacs has the same behavior as running I hope it helps even if it doesn't solve the problem completely. Maybe a more in depth reading of that thread will lead you to the answer, I am satisfied with running it from command line. |
I do have this problems with MacOS also. It seems to be a broader issue then just prettier. When I start Emacs from Applications or Spotlight, env outputs different then when loading from the terminal. You can output your env in shell and then output the env from e-shell inside emacs. If they are different you have this "broader" problem. When launching from command line, repeat this experiment and you'll see both will be the same values. This guy here made a "fix" for MacOS. If you're not in MacOS, I am sure something can be done with xdg or the default X launcher: |
Also this did not fixed for me. I usually run: |
Try copying your ~/.bashrc to ~/.bash_profile. And source ~/.bash_profile. |
I found the solution to this problem by installing this beauty from MELPA: https://github.com/purcell/exec-path-from-shell After install, justa add this anywhere in your .emacs file: And that's it. Now your shell path is available to GUI MacOS fired from from Desktop Applications, allowing you to run prettier, node, etc. |
Running prettier-js gives the error above. I did some searching and reading, and found that the "env" error usually means something is missing from the Emacs exec-path, so I tried things like this in .emacs:
As far as I can tell, node and prettier are both available at that path, but I still get the error.
Environment:
The text was updated successfully, but these errors were encountered: