ternjs / tern_for_vim

Tern plugin for Vim
MIT License
1.83k stars 100 forks source link

error appears when :Terndoc runs #23

Open lookforit opened 11 years ago

lookforit commented 11 years ago

Hi I installed this plugin ( also node.js and npm) with no problem,but when i run :Ternxxx command, error ocurrs like this: ternerr

is there any misconfigration?

marijnh commented 11 years ago

Your screenshot only shows the backtrace, not the actual error. It appears to have something to do with spawning the Tern server, which is apparently a very hard thing to do portably in Python, but without the error message, there's not much I can say about this.

lookforit commented 11 years ago

Your screenshot only shows the backtrace, not the actual error. It appears to have something to do with spawning the Tern server, which is apparently a very hard thing to do portably in Python, but without the error message, there's not much I can say about this.

thanks. so how do i get the detailed error message?

marijnh commented 11 years ago

I think it should show up in :messages -- but I don't know all that much about vim.

lookforit commented 11 years ago

I tried :message, but it output the same as the top.

ps: my vim is 7.3.969, os is windows xp sp3

marijnh commented 11 years ago

Hold on, actually the WindowsError: [error 6] part is the error message, it's just not a very useful one. Searching around for that string suggests it is what you get when you try to execute something that's not executable. Did you successfully intsall Tern? Can you run node_modules/tern/bin/tern and get a running server? What does the :show tern#command give you?

lookforit commented 11 years ago

I'm sorry i just assumed that tern-for-vim can work independently, so i did not install Tern before .

By the way, when i run tern/bin/tern.cmd, the prompt says "Listening on port 1747", seems the server worked.

marijnh commented 11 years ago

You don't need to install it 'before', you simply need to do npm install to get it into your plugin directory. Is it in node_modules in the place where you installed the plugin?

lookforit commented 11 years ago

I tried to install Tern with npm: tern_install

unfortunately error comes again. am i in the right way to install Tern?

lookforit commented 11 years ago

You don't need to install it 'before', you simply need to do npm install to get it into your plugin directory. Is it in node_modules in the place where you installed the plugin?

Yes.I used pathogen to manage plugins ,the path of node_modules directory is: _bundle\tern_for_vim\nodemodules

marijnh commented 11 years ago

You don't need a separate Tern checkout. Does bundle\tern_for_vim\node_modules\tern\bin\tern exist and start up propertly?

lookforit commented 11 years ago

You don't need a separate Tern checkout. Does bundle\tern_for_vim\node_modules\tern\bin\tern exist and start up propertly?

Yes, the directory does exsit,like this: ternrun

how shoud i check whether the Tern startup properly? I'm sorry i 'm new to js scripting.

marijnh commented 11 years ago

You could run it with node. But if it exists, I guess that wasn't the problem. I'm out of ideas on this.

lookforit commented 11 years ago

You could run it with node. But if it exists, I guess that wasn't the problem. I'm out of ideas on this.

i tried node tern "Listening on port 2136." gives back.

how do i trigger auto-complete feature? I just want to see wethear error appears for that.

snj33v commented 11 years ago

have you installed git in your system

lookforit commented 11 years ago

yes ,I installed it .The version is 1.8.1.2, on win xp.

发件人: noreply@github.com [mailto:noreply@github.com] 代表 Sanjeev 发送时间: 2013年6月23日 12:33 收件人: marijnh/tern_for_vim 抄送: Dennis Xiong 主题: Re: [tern_for_vim] error appears when :Terndoc runs (#23)

do you have installed git installed in your system

— Reply to this email directly or view https://github.com/marijnh/tern_for_vim/issues/23#issuecomment-19868963 it on GitHub. https://github.com/notifications/beacon/K3PMwQ1lZnrI6AhGFL5_RGmtvZspE5KSxEetX09ScrE3YJT5cUVN8uQxdmDbO2PG.gif

snj33v commented 11 years ago

no ERR! not found git npm doesn't recognize git, strange