Comments (11)
Thanks for the report. This looks like the same thing @carettacaretta reported at #20 (comment).
I can't reproduce it here, so forgive me if I ask some obvious/stupid questions:
- Does node run in the terminal? What is the output of
node -v
? - If yes, how did you install node? Homebrew, or another way?
- What is the output of
which node
?
Uh - not sure what else to look for at this point. We'll work this out, but I'm going to need your help.
from sublime-worksheet.
@jcartledge definitely which('node')
returns None when _spawn
is invoked, but from terminal
> python
>>> import pexpect as pex
>>> pex.which('node')
'/usr/local/bin/node'
>>>
> node -v
v0.10.0
> which node
/usr/local/bin/node
If i remember correct i used nave, nave usemain latest
to install node.
Yesterday night it worked at some point, but today the problem is still there.
Thanks for your work, awesome plugin.
from sublime-worksheet.
@carettacaretta
Because Sublime Text strip (/usr/local/bin
(at least) from PATH
environment variable/usr/local/bin
seems only accessible from terminal), so pexpect cannot find it.
You can change your worksheet.sublime-settings
accordingly, in order to get it work:
"JavaScript": {
// Here we use absolute path for node
"cmd": "/usr/local/bin/node -e \"require('repl').start('node> ')\"",
"prompt": ["node> ", "\\.\\.+ "]
}
from sublime-worksheet.
i've checked, you're right and the solution works 😆.
Thank you.
from sublime-worksheet.
That will work, but it would be better if you didn't have to hardcode it.
I'm not sure why, but /usr/local/bin is always in my path, no matter how I start ST - I thought maybe it made a difference if it was started from terminal rather than GUI, but not so.
I think it should be possible to append "/usr/local/bin" to os.environ["PATH"]
. I'll check it out and see if it works so people don't have to hack their config to get it working.
from sublime-worksheet.
For me /usr/local/bin
is on the path if I start Sublime from the terminal with /Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl
, but it's not present if Sublime is started by double-clicking on the Sublime application icon.
from sublime-worksheet.
Not sure if it's still of importance but I installed Node via Homebrew and it runs in the terminal.
> node -v
v0.10.12
> which node
/usr/local/bin/node
Happy to help!
from sublime-worksheet.
Does anyone who has this problem want check if the path
branch resolves it? Thanks.
from sublime-worksheet.
I've merged my attempt at a fix for this into master but it's not in a release yet. I'm not going to close until someone can verify that it solves the problem for them.
from sublime-worksheet.
Path branch on OSX 10.8.4 and ST2.0.1 resolves the bug.
Javascript
var foo = function(bar){
return bar;
}
foo('foobar');
Javascript after eval.
var foo = function(bar){
return bar;
}
// > undefined
foo('foobar');
// > 'foobar'
from sublime-worksheet.
Great, thanks. I'll try to wrap it up today.
from sublime-worksheet.
Related Issues (20)
- js prompt (and possibly others) too general, swallows any line with ' >'.
- Stops evaluating on return statement HOT 15
- can't access "worksheet: evaluate worksheet" HOT 9
- Erroneous "IndentationError" with python HOT 3
- Code doesn't executes if there's no new line after statement HOT 1
- Evaluating loop, first line is ignored
- actionscript repl HOT 3
- support special keywods HOT 3
- Is Sublime Text 3 supported?
- Sublime 3 Support HOT 3
- elixir repl
- regression tests
- Using Boris as a PHP REPL alternative. HOT 1
- Error when upgrading to version 0.9.0 HOT 1
- Too slow
- refactor the settings code
- Windows: scala: When I save file I get "Error: MoveFileEx(... .subl8be.tmp) c:\test.scala failed, Access is deined." HOT 4
- Project settings not being applied HOT 2
- Support keepalive for REPL instances
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 sublime-worksheet.