emmetio / sublime-tern

TernJS plugin for Sublime Text
222 stars 13 forks source link

Failing on "Unrecognized type spec" #12

Open jonkirkman opened 11 years ago

jonkirkman commented 11 years ago

I may be reading this incorrectly but it seems that PyV8 is failing when trying to throw error for "Unrecognized type spec".

Starting TernJS server for /blah/blah/.sublime-project with 2 libs and 123 files

calling inside

Traceback (most recent call last):
  File "./sublime_plugin.py", line 362, in run_
  File "./tern.py", line 451, in run reload_ternjs()
  File "./tern.py", line 383, in reload_ternjs sync_all_projects()
  File "./tern.py", line 368, in sync_all_projects sync_project(p)
  File "./tern.py", line 348, in sync_project ctx.js().locals.startServer(json.dumps(p, ensure_ascii=False), resolved_libs)
PyV8.JSError: JSError: Error: Unrecognized type spec: [$0.✖] (at 4) ( js/env.js @ 42 : 12 )  ->       throw new Error("Unrecognized type spec: " + this.spec + " (at " + this.

Also, my ternjs settings should only be requiring 1 type spec / lib (jquery).

"ternjs": {
  "libs": [ "jquery" ]
}

Thanks for the great work!

sergeche commented 11 years ago

It looks like a TernJS error. Can you provide example JS code where this error appears?

jonkirkman commented 11 years ago

How can I determine which of the 123 files it is trying to type when it fails?

sergeche commented 11 years ago

@jonkirkman the only way to find it out is to use include project option and add files one-by-one.

rrthomas commented 10 years ago

Or do a binary search!