Sublime text 3 + TernJS + Meteor Autocomplete error.. HELP


#1

Tried to install TernJS + Meteor Autocomplete on Sublime to get the autocomplete features. However I keep getting the error message like this:

Failed to start server:

/Users/LinX/Documents/Web/meteor/meteor.js:2
Tasks = new Mongo.Collection(“tasks”);
^
ReferenceError: Mongo is not defined
at Object. (/Users/LinX/Documents/Web/meteor/meteor.js:2:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at loadPlugins (/Users/LinX/Library/Application Support/Sublime Text 3/Packages/Meteor Autocomplete (TernJS)/node_modules/tern/bin/tern:148:15)
at startServer (/Users/LinX/Library/Application Support/Sublime Text 3/Packages/Meteor Autocomplete (TernJS)/node_modules/tern/bin/tern:242:17)
at Object. (/Users/LinX/Library/Application Support/Sublime Text 3/Packages/Meteor Autocomplete (TernJS)/node_modules/tern/bin/tern:231:20)


#2

Solved…


#3

I have the same issue, how did you fixed it?


#4

I didn’t specify a javascript build system. Once I have done that, the error disappeared.

Create a new build system in Sublime text with following code

{
“cmd”: [“node”, “–use-strict”, “–harmony”, “$file”],
“selector”: “source.js”,
“path”: “/usr/local/bin/”
}

Hope that works for you as well.


#5

Any idea if this will work on Sublime Text 2?


#6

where this code should be?


#7

Inside Sublime text 3, go to Tools -> Build systems -> New build systems