Meteor Tutorials Don't Work with Meteor Workspace



Trying to run the Meteor “simple todos” tutorial isn’t possible with the default Meteor workspace:


I been working with a similar tutorial and I am having problems too. Specifically with the connection of the MongoDB. All other stuff works fine, but without the Mongo connection it becomes pointless. The application does not seem to recognize the currently running MongoDB and I can’t figure how to make it work. I have spent two days reading all kinds of stuff on line and nothing seems to work here.
I anyone has some ideas…



Thanks for writing in! Please post all relevant information about the issue so we can help you better. Things like screenshots, error logs, pertinent code snippets or anything else you deem useful in order to reproduce / debug the issue you’re facing.

Thanks! :slight_smile:



The image shows that the file.js has a new Mongo.Collection(text) instruction and says that Mongo is not defined… I have attempted to input something on the file and it will report an error on that…
I should be able to create the MongoDB through the command line, or insert documents into it from the command line and it does not work…




Thanks for the information. Usually node throws that error when a variable is referenced but isn’t defined yet. In your case, you’re probably missing an import statement like:

import { Mongo } from 'meteor/mongo';




Tanks for the response.

I have done that before and did not work.


What is the error when you do add that?


Your code is running at
Important: use process.env.PORT as the port and process.env.IP as the host in your scripts!

Debugger listening on port 15454
(function (exports, require, module, __filename, __dirname) { import { Mongo } from ‘meteor/mongo’;

SyntaxError: Unexpected reserved word
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions…js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.runMain [as _onTimeout] (module.js:441:10)
at Timer.listOnTimeout (timers.js:92:15)

Process exited with code: 1


Ok, so from the example, I assumed (sorry, I don’t have any recent meteor experience), that meteor came bundled with Babel (or somehow supported ES6 syntax).

If you’re not using ES6 modules in your app, you can try:

Meteor = require("meteor/mongo").Meteor

instead. That should (probably :slight_smile: ) work.

If that doesn’t help, I’m afraid the question would be more suited to StackOverflow, or the Meteor forums, as it doesn’t seem related to Cloud9.



Thanks. I have looked for that and can’t figure it out. I’ll keep trying.


I spent most of the last two days searching on StackOverflow, and other forums without success. Just a few minutes ago I found that someone in StackOverflow had suggested to move the project.js file from the client folder into a lib folder (not created automatically) and that solved the problem. Now the MongoDB is getting the inserts and keeping them without reporting an error.

Thanks for your help.