meteor

meteor test-packages can't find npm module

血红的双手。 提交于 2019-12-24 06:07:41
问题 I'm trying to use lodash package in testing packages in Meteor version 1.3.2.4. I've installed lodash via command: meteor npm install --save lodash . It works fine in module but it doesn't work in tests. Here is my onTest : Package.onTest(function(api) { var dependencies = [ 'practicalmeteor:mocha@2.4.5_2', 'practicalmeteor:chai@2.1.0_1', 'practicalmeteor:sinon@1.14.1_2' ]; api.use('core'); api.use(dependencies); api.mainModule('tests/core.specs.js'); }); and when I try to use lodash (I've

Google Maps with Meteor not working

此生再无相见时 提交于 2019-12-24 05:58:15
问题 For my project i need google maps api. I just can serve the api via script tag, so i tried something like that. my html: <head> <title>app</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"> </script> </head> <body> {{> hello}} </body> <template name="hello"> <div id="map-canvas"/> </template> my js: if (Meteor.isClient) { var mapOptions = { center: new google.maps.LatLng(-34.397, 150.644), zoom: 8, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map

How to modify package that is dependency of other packages - MeteorJS

回眸只為那壹抹淺笑 提交于 2019-12-24 05:52:34
问题 So, my problem is that I am trying to add a couple of console.log() to a js file of an already installed package that I have in my project. The package that I am trying to add these lines to is aldeed:autoform , since I've discovered kind of a bug in a function and I want to contribute with a solution. In order to modify a package, I have already done the following steps: Clone the github repo for autoform inside myProject/packages/ folder. Modified the lines that I wanted to. Changed the

Pubnub subscribe stops receiving messages after some time

孤街醉人 提交于 2019-12-24 05:46:44
问题 I have some remote devices which communicate with a central Meteor application running on a Digital Ocean Ubuntu 14.04 droplet in a Docker container. Each device has it's own channel, and the server is subscribed to all the channels plus a "telemetry" channel common to all devices. Everything works fine for a while (a few days to a few weeks), but then the subscribe callback on the server stops firing whenever there's a message sent (the messages show up in the PubNub debug console). The

How to allow write access on system collection of a database in mongo?

吃可爱长大的小学妹 提交于 2019-12-24 05:46:07
问题 With latest meteor update, meteor is trying to do a write operation on my_database.system.dummy in my mongo database. I am using external mongo database with authentication enabled. The user I've created has full read-write access to my_database database but it can't write to my_database.system collection. How can I allow my user to be able to write to my_database.system collection? UPDATE I think I didn't phrased my question right. Problem is with mongo db connection. When meteor tries to

Updating item in array with unique ID

房东的猫 提交于 2019-12-24 05:36:08
问题 I've got a document structure like this: Content { _id: "mongoId" Title: "Test", Age: "5", Peers: [{uniquePeer: "1", Name: "Testy Test", lastModified: "Never"}, {uniquePeer: "2", Name: "Test Tester", lastModified: "Never"}] } So Peers is an array that has a unique identifier. How can I update the lastModified of one of the sets in the array? According to mongodb I can only update a document using the document's unique ID, but that's at the top level. How can I say update this lastModified

Meteor stuck at Extracting meteor-tool@1.4.0-1

好久不见. 提交于 2019-12-24 05:07:31
问题 I am having an issue where I do meteor run in my project, and it begins to install meteor-tool@1.4.0-1, once it is 100%, it says Extracting meteor-tool@1.4.0-1... but it never finishes. I uninstalled meteor and reinstalled it but I am having the same issue. United State. Windows 10. 回答1: This is a problem caused by the tar extractor provided by Git. Find where is located the tar tool used by your system, running: $ where tar In my case, it is located in C:\Program Files\Git\usr\bin\tar.exe

Using jQuery plugins in Meteor

扶醉桌前 提交于 2019-12-24 04:37:06
问题 I have been trying to add a jQuery plugin to Meteor but Meteor refuses to let the plugin work client side. The example is I have this plugin that allows me to shuffle a bunch of divs around called jQuery Shuffle but when I call the following script in the head or from an external file it does not execute. It could be the plugin not publishing functions but it is client side so that makes no sense. I have verified that javascript and jQuery is working through a few console.log() command tests

Iron Router: How do I send data to the layout?

。_饼干妹妹 提交于 2019-12-24 04:26:10
问题 Using Iron Router, I understand how to set data for a template. But how do I send data to a layout that was globally defined? I set the router layout by: Router.configure({ layoutTemplate: 'NAME' }) This will set the layout for all my routes. However from my individual routes, I'd like to send data to the layout template. 回答1: The layout uses the data context defined with data in the route option. Here is an excerpt from Iron Router documentation: Router.route('/routeName', { ... // A data

Meteor.Collection with Meteor.bindEnvironment

你。 提交于 2019-12-24 04:24:08
问题 Within a function that is already within Meteor.binEnvironment, when I run <collection>.find ({}) , I get the error throw new Error ('Can \' t wait without a fiber '); If you place that call also within Meteor.bindEnvironment(<collection>.find ({})) , the error message becomes: throw new Error (noFiberMessage); The function in question runs through Meteor.methods ({}) Where am I going wrong? Example to reproduce the error: Meteor.methods({ "teste" : Meteor.bindEnvironment(function(){ var