meteorite

Meteor JS : Client not getting data from Mongo DB

断了今生、忘了曾经 提交于 2019-12-05 15:39:16
I have started learning MeteorJS and made a sample app. I have a collection in mongoDB and I am trying to see that collection in client Here is my server Code(file is in /libs) newColl=new Meteor.Collection("newColl"); if(Meteor.isServer){ Meteor.publish('newCollectionData', function(){ console.log(newColl.find().fetch()); return newColl.find(); }); } Here is My client Code(file is in /client) Meteor.subscribe("newCollectionData"); //console.log(newColl.find()); console.log(newColl.find().fetch()); var data= newColl.find().fetch(); console.log(data); The log in server prints the data correctly

Error: Cannot find module 'underscore' thrown in console for all Meteor commands

徘徊边缘 提交于 2019-12-05 15:28:16
Error: Cannot find module 'underscore' thrown in console for all Meteor commands After every meteor or meteorite command such as meteor or mrt create myapp the following error is thrown. This error seemed to appear suddenly, as meteor was functional the night before and no changes have been made since. Austins-MacBook-Pro:Projects austinrivas$ mrt create test-app /Users/austinrivas/.meteor/tools/3cba50c44a/tools/meteor.js:1480 }).run(); ^ Error: Cannot find module 'underscore' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require

metor blade template throws “second landmark in same branch” exception in for loop

天大地大妈咪最大 提交于 2019-12-05 10:39:18
I have a for loop that I want to include a template view in: table.blade: #game h1= table.name -if( table.playerSitting() ) a.btn.btn-danger.stand(href="#") Stand #table -for (var i=0; i<7;i++) include 'seat' exposing i seat.blade: - id = 'p' + (i+1) div(id="#{id}") -if (table.hasAt(i)) p= table.usernameAt(i) -else -if( !table.playerSitting() ) a.btn.btn-inverse.sit(href="#", data-key="#{i}") Sit -else p   When I first load the view, everything draws fine. But if I sit or stand, or go to another table, I get this: Exception from Deps recompute: Error: Can't create second landmark in same

How to fork an existing Meteorite package in a clean way?

三世轮回 提交于 2019-12-04 15:54:31
问题 I'm trying to figure out the best/cleanest way to fork an existing package on Atmosphere within a project. I encountered a few occasions where an existing package needed some modifications and I was forced to fork it. As far as I can tell, the following options exist. Unfortunately, all of these have their own issues and I have yet to find the perfect solution. I will use meteor-router as an example: 1. Simply copy the package files into your packages folder Steps: remove packages/router/.git

Unable to install meteorite on Ubuntu VM

可紊 提交于 2019-12-03 18:00:13
问题 I run Win7 and install Ubuntu 12.04.3 in Oracle VM VirtualBox 4.3.6. First thing I do is try to install meteorite, but get the following error: npm install -g meteorite npm http GET https://registry.npmjs.org/meteorite npm ERR! Error: failed to fetch from registry: meteorite npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12 npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9) npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry

Where to put a separate admin interface for a Meteor app?

三世轮回 提交于 2019-12-03 12:58:02
I'm trying to build a smart package for Meteor app that provides some monitoring capabilities and other tools based on the features of the smart package. For more details read this question . In any case, I'm trying to figure out the best way to create an admin interface for this package, which will of course be itself running in Meteor. Ideally, I'd like something similar to observatory , except on a separate part of the site that the package can control (or even on a different port.) The way the observatory folks have tackled this problem is pretty ingenious - they just have a popup div on

Meteor: “=> Exited with code: 8” error

社会主义新天地 提交于 2019-12-02 16:21:40
问题 Just getting started with Meteor, following the tutorial presented in Discover Meteor . After implementing code from Chapter 3, I kept getting the following error: W20150714-18:47:36.539(-7)? (STDERR) W20150714-18:47:36.540(-7)? (STDERR) /Users/TXC/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245 W20150714-18:47:36.540(-7)? (STDERR) throw(ex); W20150714-18:47:36.540(-7)? (STDERR) ^

MeteorJS: Users collection how to expose new field

我的未来我决定 提交于 2019-12-01 23:34:26
I have added new field in user collection but when I access it in the client side Meteor.user().cart ( cart is my new field). Its undefined. How can expose new field (cart) so that it can be access in the client? The easiest way is to add a null publisher which will automatically send the data without the need for a subscription. Be sure to limit the fields to only the ones you need. Meteor.publish(null, function() { return Meteor.users.find(this.userId, {fields: {cart: 1}}); }); 来源: https://stackoverflow.com/questions/29383464/meteorjs-users-collection-how-to-expose-new-field

How to prevent auto login after create user

喜欢而已 提交于 2019-12-01 02:32:44
I add accounts-password and accounts-base packages in Meteor When I create user like this: Accounts.createUser({username: username, password : password}, function(err){ if (err) { // Inform the user that account creation failed console.log("Register Fail!") console.log(err) } else { console.log("Register Success!") // Account has been created and the user has logged } }); Account has been created and the user has logged. for instance, I log in as an administrator and I want to create a account for somebody,but I don't want to log out after create account. How to prevent auto login after create

How to access client IP address in Meteor? [duplicate]

主宰稳场 提交于 2019-11-30 13:43:23
This question already has an answer here: How to get the user IP address in Meteor server? 6 answers This seems like a very basic question that doesn't have an elegant solution/answer out there. How can I access the client (remote) IP address from (1) the server or (2) the client? As Florin mentioned, this is all pretty much integrated with Meteor now, as opposed to the dark ages when we had to do it ourselves. However, I've additionally wrapped it in a package that tracks all open connections and allows you to query for their IPs: https://github.com/mizzao/meteor-user-status . It also does a