sublime-tern icon indicating copy to clipboard operation
sublime-tern copied to clipboard

Failing on "Unrecognized type spec"

Open jonkirkman opened this issue 11 years ago • 4 comments

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!

jonkirkman avatar Apr 09 '13 18:04 jonkirkman

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

sergeche avatar Apr 10 '13 14:04 sergeche

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

jonkirkman avatar Apr 11 '13 19:04 jonkirkman

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

sergeche avatar Apr 21 '13 16:04 sergeche

Or do a binary search!

rrthomas avatar Sep 10 '14 12:09 rrthomas