-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Javascript Layer Could not start tern server (On Windows) #5733
Comments
I think this is due to the default value of If this is the issue I am ok the set the default to nil. |
Unfortunately, changing javascript-disable-tern-port-files to nil and restarting Emacs did not fix the issue. http://i.imgur.com/Nb4Lenn.png |
I have the same problem on windows. |
add param tern-command in dotspacemacs-configuration-layers like this:
as a workaround |
PR welcome 😉 |
it'd be better (& probably very easy for someone proficient with elisp & emacs) to solve the actuall problem , tern executable is visible & in PATH, there's no reason for any sw to expect anything more (or to behave dumber than DOS back then).. |
@svatem1 Probably, but this is an upstream issue, not something we should hack on Spacemacs side, right? |
are they rejecting patches? do they feel they have a problem? doesn't seem so |
@svatem1 I'm not doing javascript, but I read the linked threads and this is what I understood: First regarding the executable:
So as for other external tools, you have to install it first on your system before using it from emacs. Second, regarding the problem of the executable not being found: As it was reported, setting The code responsible for this is here. They are searching for the To conclude: Handling the |
@StreakyCobra I don't think this problem has ever been about tern executable not being present on system.. not here, not in the other thread (their reasoning for closing the thread with "tern.el in MELPA is shipped without tern executable" is weird at best) you're completery right about what you say regarding PATH (concept that's with us since ever, on DOS, on Linux, on Windows) & advantages of upstream being the one fixing it what I'm trying to say is - adding those 2 lines (that'll handle PATH) to the code snippet you linked is a minute work for somebody who's speaking elisp & emacs; notifying them via referencing the thread might take a longer time and might end with the same conclusion as last time |
Yeah, I was writing my thoughts while reading about the problem, sorry for the noise.
I'm not sure it will requires only 2 lines 😉 but for sure it will require more than one minutes to do it properly and to be sure to handle all cases.
The conclusion of the linked threads was "need help", so it's not a matter of time but of people tackling the problem. I don't really have time, I can't test the edges cases as I don't have windows and the default setup is working on my computer. So… wait for someone else tackling the problem now that it has been clearly stated, or try to work on it yourself :-) |
@StreakyCobra i'm actually really happy someone shed light on this! the more polished Spacemacs experience is, the better |
I think this is more related to the problem here: ternjs/tern#256 |
Assuming due to the lack of movement here and the claims made in the linked issue that this is indeed fixed. If not, let us know. |
Description
From an initial installation of Spacemacs v.0.105.16 javascript layer, Emacs tries to find the tern server from the same directory the js file is in. (This is the same for js files in other projects it will look for tern in ./tern directory).
I tried putting the below code in my private layer and also in dotspacemacs/user-config so Emacs would be able to find tern and Tern for javascript was working pre-spacemacs (when I was using my normal evil+emacs). However with spacemacs javascript layer, completion in a js file results in this kind of error
I tried reinstalling node and npm and recloning tern (and npm install'd it) but still the error occurs so I think it may be something with the javascript layer.
Reproduction guide
Note
I can get it working by starting the tern server in the root of project
Tern works with pre-spacemacs set up using company-tern
The text was updated successfully, but these errors were encountered: