sublime-better-coffeescript icon indicating copy to clipboard operation
sublime-better-coffeescript copied to clipboard

"Coffee: Display Javascript" output is blank

Open horak opened this issue 11 years ago • 6 comments

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!

:scream:

horak avatar Apr 12 '14 02:04 horak

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'

ackrause avatar May 02 '14 18:05 ackrause

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"
}

icflorescu avatar May 03 '14 17:05 icflorescu

I do not use any node version manager :(

horak avatar May 03 '14 19:05 horak

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.

ackrause avatar May 03 '14 23:05 ackrause

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.

markalfred avatar May 09 '14 18:05 markalfred

:+1:

horak avatar May 13 '14 00:05 horak