Invalid !type spec: +DOMNode
CarlQLange opened this issue · comments
/usr/local/lib/node_modules/tern/lib/def.js:361
else throw new Error("Invalid !type spec: " + tp);
^
Error: Invalid !type spec: +DOMNode
at passOne (/usr/local/lib/node_modules/tern/lib/def.js:361:20)
at passOne (/usr/local/lib/node_modules/tern/lib/def.js:374:7)
at passOne (/usr/local/lib/node_modules/tern/lib/def.js:374:7)
at passOne (/usr/local/lib/node_modules/tern/lib/def.js:374:7)
at passOne (/usr/local/lib/node_modules/tern/lib/def.js:374:7)
at doLoadEnvironment (/usr/local/lib/node_modules/tern/lib/def.js:435:5)
at Object.exports.load (/usr/local/lib/node_modules/tern/lib/def.js:461:7)
at /usr/local/lib/node_modules/tern/lib/infer.js:722:13
at Object.exports.withContext (/usr/local/lib/node_modules/tern/lib/infer.js:732:18)
at new exports.Context (/usr/local/lib/node_modules/tern/lib/infer.js:706:13)
Running tern after switching on the meteor plugin causes this error to happen and my computer to be sad. I woud really love to see this fixed but I can't even read the stack trace :(
This sucks! I will look at it on the weekend.
This revision works: 2de5ec9
Yeah, that's because I added a custom field !locus
that is not recognized by Tern (I forked Tern in my other project). I am confused by the stacktrace you posted though, it doesn't like !type
for some reason :(
Failed to start server:
/Users/aharte/.vim/bundle/tern_for_vim/node_modules/tern/lib/def.js:361
else throw new Error("Invalid !type spec: " + tp);
^
Error: Invalid !type spec: +DOMNode
at passOne (/Users/aharte/.vim/bundle/tern_for_vim/node_modules/tern/lib/def.js:361:20)
at passOne (/Users/aharte/.vim/bundle/tern_for_vim/node_modules/tern/lib/def.js:374:7)
at passOne (/Users/aharte/.vim/bundle/tern_for_vim/node_modules/tern/lib/def.js:374:7)
at passOne (/Users/aharte/.vim/bundle/tern_for_vim/node_modules/tern/lib/def.js:374:7)
at passOne (/Users/aharte/.vim/bundle/tern_for_vim/node_modules/tern/lib/def.js:374:7)
at doLoadEnvironment (/Users/aharte/.vim/bundle/tern_for_vim/node_modules/tern/lib/def.js:435:5)
at Object.exports.load (/Users/aharte/.vim/bundle/tern_for_vim/node_modules/tern/lib/def.js:461:7)
at /Users/aharte/.vim/bundle/tern_for_vim/node_modules/tern/lib/infer.js:722:13
at Object.exports.withContext (/Users/aharte/.vim/bundle/tern_for_vim/node_modules/tern/lib/infer.js:732:18)
at new exports.Context (/Users/aharte/.vim/bundle/tern_for_vim/node_modules/tern/lib/infer.js:706:13)
I'm getting something similar when I switch the plugin on too.
@Slava if you wish to add custom data (like your locus), you must use !data
. In other words, instead of writing :
"test": {
"!locus": "Anywhere"
you must write :
"test": {
"!data": {
"!locus": "Anywhere"
}
After you can retrieve value of .locus with getType().metaData["!locus"]. Hope it will help you.
@angelozerr thanks! Will do it today.