Skip to content
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

"Coffee: Display Javascript" output is blank #142

Open
horak opened this issue Apr 12, 2014 · 6 comments
Open

"Coffee: Display Javascript" output is blank #142

horak opened this issue Apr 12, 2014 · 6 comments

Comments

@horak
Copy link

horak commented Apr 12, 2014

I have an open .coffee file and run the aforementioned command, I'm then brought to a blank file.

I'm sure I'm doing something wrong here as I couldn't find anybody else who is having a similar issue. Any ideas why this might be?

If there is a place this is better asked please let me know!

😱

@ackrause
Copy link

ackrause commented May 2, 2014

I'm having the same issue. When I issue the command the terminal displays

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 543, in run_
    return self.run(edit, **args)
  File "CoffeeScript in /Users/ackrause/Library/Application Support/Sublime Text 3/Installed Packages/Better CoffeeScript.sublime-package", line 217, in run
  File "CoffeeScript in /Users/ackrause/Library/Application Support/Sublime Text 3/Installed Packages/Better CoffeeScript.sublime-package", line 88, in brew
  File "CoffeeScript in /Users/ackrause/Library/Application Support/Sublime Text 3/Installed Packages/Better CoffeeScript.sublime-package", line 43, in run
  File "CoffeeScript in /Users/ackrause/Library/Application Support/Sublime Text 3/Installed Packages/Better CoffeeScript.sublime-package", line 74, in _run
  File "X/subprocess.py", line 818, in __init__
  File "X/subprocess.py", line 1416, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: 'coffee'

@icflorescu
Copy link

If you're using nvm like I do, maybe you need something like this in CoffeeScript.sublime-settings:

{
  "binDir": "/Users/ionut/.nvm/v0.10.28/bin"
}

@horak
Copy link
Author

horak commented May 3, 2014

I do not use any node version manager :(

@ackrause
Copy link

ackrause commented May 3, 2014

I'm not using any version managers either, but I was able to get it to work. I opened up Preferences > Package Settings > Better CoffeeScript > Settings - Default and saw that the envPath variable was blank (before I just checked that node and coffee were in a place that the settings file in the Readme would find, so sorry about not checking my settings file before messaging above). Problem found. When I tried to edit it, though, it wouldn't let me, and in fact it said that the file it was showing me didn't exist. I created the file in the terminal, copied over the contents from the example settings file in the Readme, and set the envPath variable correctly, so it now works.

I installed Better Coffeescript via Sublime's package manager, and tried uninstalling and reinstalling to see if some file just didn't get copied over correctly the first time, but I had the same problem the second time. I don't know where it was grabbing the settings file it showed me, since hitting save just made it try to write to a directory that didn't exist, rather than wherever the file came from. I'm running Sublime Text 3 on Mac OS X 10.9.2, in case it's a system-specific problem.

@markalfred
Copy link
Contributor

In terminal, run which coffee to see where coffee is installed.

If it's /usr/bin/coffee, you should be fine.

If it's /usr/local/bin/coffee (or anything else), go to Sublime, Preferences > Package Settings > Better CoffeeScript > Settings - User

Add "binDir": "/usr/local/bin" (or whatever which said it was) there.

@horak
Copy link
Author

horak commented May 13, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants