Open alexzzp opened 9 years ago
Is the .js file that you're using to generate the .json file something that you could show me? (Please also include the command arguments passed to condense
)
command
node ..\tern\bin\condense cocos2d-js-lite.js --name cocos2d-js-lite > ..\tern\defs\cocos2d-js-lite.json
error info
vim/bundle/tern_for_vim/node_modules/tern/lib/def.js:438 else throw new Error("Invalid !type spec: " + tp); ^ Error: Invalid !type spec: number at passOne (vimdir/bundle/tern_for_vim/node_modules/tern/lib/def.js:438:20) at doLoadEnvironment (vimdir/bundle/tern_for_vim/node_modules/tern/lib/def.js:513:74)
source js file
Cocos2d-JS.js download page
I use the tool condense to generate a def file (cocos2d-js-v3.6-lite.json), and I put the file in "node_modules/tern/defs/cocos2d-js-v3.6-lite.json" directory, and include it in the .tern-project file like this
{ "libs": ["cocos2d-js-v3.6-lite"], "loadEagerly": [ "files" ], "plugins": { "complete_strings": {} } }
but tern fail to launch, when I launch by myself, the following error:
> node vimdir/bundle/tern_for_vim/autoload/../node_modules/tern/bin/tern
vimdir/bundle/tern_for_vim/node_modules/tern/lib/def.js:363 else throw new Error("Invalid !type spec: " + tp); ^ Error: Invalid !type spec: number at passOne (vimdir/bundle/tern_for_vim/node_modules/tern/lib/def.js:363:20) at doLoadEnvironment (vimdir/bundle/tern_for_vim/node_modules/tern/lib/def.js:443:74) at Object.exports.load (vimdir/bundle/tern_for_vim/node_modules/tern/lib/def.js:463:7) at vimdir/bundle/tern_for_vim/node_modules/tern/lib/infer.js:750:13 at Object.exports.withContext (vimdir/bundle/tern_for_vim/node_modules/tern/lib/infer.js:760:18) at new exports.Context (vimdir/bundle/tern_for_vim/node_modules/tern/lib/infer.js:733:13) at Object.signal.mixin.reset (vimdir/bundle/tern_for_vim/node_modules/tern/lib/tern.js:129:17) at Object.exports.Server (vimdir/bundle/tern_for_vim/node_modules/tern/lib/tern.js:111:10) at startServer (vimdir/bundle/tern_for_vim/node_modules/tern/bin/tern:144:16) at Object. (vimdir/bundle/tern_for_vim/node_modules/tern/bin/tern:139:14)