angelozerr / tern-node-express

A Tern plugin adding support for express web application framework for node.
http://expressjs.com/
MIT License
56 stars 4 forks source link

getting Error running timer `ac-show-menu': (wrong-type-argument stringp nil) #11

Closed nacho4d closed 9 years ago

nacho4d commented 9 years ago

I am trying to setup a tern-node-express. I have set my .ternproject file:

{
    "plugins": {
        "node": {},
        "node-express": {}
    }
}

However I get below error when tern is tries to complete an express variable. (I am using (setq debug-on-error t)).

For example

express = require('express');
var app = express()
app.  << As soon I as type "." the error appears See screenshot below 

tern-express

This is the error I get:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("fn" nil)
  #[257 "\301^A\236A\302^B\236A\303^C\236A\304^A\305\306\307^F^F\"\203^[^@\310\202^\^@\311\312\313^F^G^H\314\315\316%\317^F^H\320^F^KQ&^G\207" [tern-ac-completion-truncate-lengt$
  mapcar(#[257 "\301^A\236A\302^B\236A\303^C\236A\304^A\305\306\307^F^F\"\203^[^@\310\202^\^@\311\312\313^F^G^H\314\315\316%\317^F^H\320^F^KQ&^G\207" [tern-ac-completion-truncat$
  tern-ac-completion-matches()
  ac-candidates-1(((candidates . tern-ac-completion-matches) (prefix . tern-ac-completion-prefix) (requires . -1)))
  ac-candidates()
  ac-update(nil)
  ac-update-greedy()
  apply(ac-update-greedy nil)
  byte-code("r\301^H\302H^H\303H\"\210)\301\207" [timer apply 5 6] 4)
  timer-event-handler([t 0 0 100000 0.1 ac-update-greedy nil idle 0])

I wonder what am I missing? I don't know where to start. Any help is appreciated

BTW autocompleting other non-express variable work fine

angelozerr commented 9 years ago

At first it's .tern-project file.

It's hard to help you because I'm using this tern plugin inside Web Browser and Eclipse IDE and it works great.

Your trace is very hard to understand. Which ternjs version do you use?

nacho4d commented 9 years ago

tern version is "20150302.211" I got if from http://tromey.com/elpa/

Is there a way I can check tern-node-express is installed successfully?
(So I can narrow the search of the problem. I just started asking here because other completions of variables defined in the same file worked but when completions of an express object are supposed to appear I get that error.)

nacho4d commented 9 years ago

Sorry for the rant. I found the problem was the project filename.
It was .ternproject but it should be .tern-project. I renamed it and everything works as expected now :+1: Thank you very much

angelozerr commented 9 years ago

Cool.

Hope this tern plugin will help you.