Using aldeed:autoform with iron:router - meteor

I added aldeed:autoform for my meteor project by including following packages.
aldeed:collection2
aldeed:autoform
After the inclusion, the routing of the application is crashed. For every route it says that the routes are not defined.
And after I remove the above aldeed:autoform packages from the project, the routing worked as expected. I want to know whether these two packages are incompatible or how to get the project working with these packages?

I'm fairly certain that IronRouter and Autoform are compatible​ with each other (it is a common combination). I'm wondering if you are having issues because of how you installed collection2. Per the latest Autoform README.md...
AutoForm 6.0 is now available and requires switching your app to using the SimpleSchema package from NPM and aldeed:collection2-core package.
I have not tested this but perhaps try following these instructions instead.

there should be more than 'no routes defined' error. any js error will break the routing. can you paste the whole console messages here?

Related

Ionic push: web client incorrectly installs

Following the guidelines here: http://docs.ionic.io/docs/push-from-scratch I am having trouble with step 2 - installing ionic add ionic-platform-web-client.
My index file within my app adds <script src="lib/ionic-platform-web-client/dist/ionic.io.bundle.min.js"></script> as it should, however the file doesn't exist at this location, even after running 'ionic lib update'.
(For ease of explanation in this section I am using the non minified version of the bundle: ionic.io.bundle.js (the results are the same with both full and minified versions of the files)).
Manually adding ionic.io.bundle.js from https://github.com/driftyco/ionic-platform-web-client/tree/master/dist will give me this error:
"Uncaught TypeError: Cannot call method 'get' of undefined
ionic.io.bundle.js (3429,0)"
from this code:
key: "get",
value: function get(name) {
return this._settings.get(name);
}
I found a 'hacky' way to get the dev pushes working by simply returning this instead of the full return this._settings.get(name) statement, although this only really suits the purpose of debugging and additionally does not allow removal of developer mode by settings 'ionic config set dev_push false' or manually setting "dev_push":false in .io-config.json.
I am unsure as to whether manually adding ionic.io.bundle.js is simply adding to my problems or whether this is the right approach to take and that the errors produced are the real problem?
I am running:
ionic 1.1.0
ionic CLI 1.7.7,
cordova 5.3.3,
bower 1.6.2,
npm 2.11.3,
visual studio 2015 community with cordova/ionic setup,
I've also updated my android platform - for which I am currently building to (deploying to nexus 7).
TheCannot call method 'get' of undefined in ionic.io.bundle.js happens because of missing settings in the bundle.
This could be fixed by running:
ionic config build
Although I still haven't been able to install the ionic web platform via 'ionic add ionic-platform-web-client' in the cli I have managed to get the ionic push notifications working.
Firstly I made sure in my app directory within the cli to use 'ionic lib update'. As the setup of my project was different (thanks to visual studio). You will likely already have these files using a custom setup, but I found it's good to have the directories in place.
Secondly I manually downloaded the web client https://github.com/driftyco/ionic-platform-web-client4 not just the ionic.io.bundle.min.js which seemed to fix my "Uncaught TypeError: Cannot call method 'get' of undefined" problem mentioned previously, after I moved the entirety of this in my lib directory. (Make sure the name of the downloaded folder matches: "ionic-platform-web-client" exactly, and doesn't contain any words like master).
Thirdly, as I couldn't add version 1.3.0 of the push plugin (which continually gave me the beloved 'uh oh' error) I used 1.2.3 instead. I installed this via: 'cordova plugin add https://github.com/phonegap/phonegap-plugin-push.git#1.2.31'. Although I have just noticed 1.4.0 is available which may also work?
This should hopefully fix any issues you have, even if it's not a perfect solution. As a side note: I know it is mentioned somewhere on one of the ionic pages that you need to have a traditional project setup and then move the relevant files but it would be nice to have some description of how to go about this - as you may not know what the relevant files are. For anyone who comes here scratching their heads, If you're using visual studio to create your ionic projects from scratch or any other custom setup, you will likely run into the same issues, as the relevant directories created using 'ionic start myApp' will likely have been omitted.

Management packages. What tool should I use?

I'm starting new app with meteor and I'm confuse when I have to install packages.
Meteor gives the possibility to install packages just like that:
meteor add <username>:<packagename>
Ok, very easy. The problem is that I would like use bower then, How I have to install the packages? For example angular.
meteor add urigo:angular
is the same as? what is the difference*? How I have to perform?
bower install angular
The logical conclusion could be use one of them, but I have seen in examples that they can be toguether.
*the package is recorded in different places, but the operation is the same?
With
meteor add <developer>:<packagename>
you add packages from the Meteor specific package database. Meteor packages are completely integrated into the Meteor eco-system and may contain both server and client side code.
You should use "meteor add" whenever possible.
To find Meteor packages you can use Atmosphere
Bower on the other hand is a framework independent package system for client side (mostly) JavaScript packages. It's not well integrated with Meteor - Although community packages exists to simplify usage of Bower packages with Meteor.
To answer you specific example:
meteor add urigo:angular
This command adds the Angular package of the Angular-Meteor project to your Meteor application. It's not only Angular but does also include some Angular services ($meteor) to provide integration of Meteor with Angular.
It even adds Angular support to the server side to some degree.
bower install angular
only downloads the official minified and non-minified javascript file of the latest Angular version for client side use.
You could use the Bower version with Angular but you wouldn't get the benefits of the integration.
While I don't use Bower myself, check out this package: https://atmospherejs.com/mquandalle/bower. I think it may help answer your question.

Meteor Project not supported

I am trying to run a project on meteor but getting this error in the command line-
this project uses Meteor1.0.2.1, which isn't available on Windows. To
work with is app on all supported platforms, use ,meteor update
--release METEOR#1.1.0.2 to pin this app to the newest Windows-compatible release.
I have tried updating to which I am getting the error message
while checking for meteorhacks:kadira-binary-deps#1.2.1:error: No
compatible binary build found for this package. Contact the package
author and ask them to publish it for your platform.
I tried updating this to which i was brought back to the first error message.
Does anyone know how I can run this meteor package? It is sparrow-finance to be specific.
Regards
Chris
The answer is simply remove the kadira package which you can do by editing the packages file in .meteor.
But, kadira is really useful. So what I'd suggest is to set up meteor environments. Meteor cookbook has a good example of this - https://github.com/awatson1978/meteor-cookbook/blob/master/cookbook/environment-detection.md .
If your environment is anything other than local, use kadira, else don't use it.

TypeError: templateSpec.call is not a function

How to fix handlebar issue with nodeJS
TypeError: templateSpec.call is not a function
I had the same problem when I was pre-compiling my templates with a specific version and using them with a different version of runtime.
In my case, gulp-handlebars was using the edge version, and I had to install the version I needed and passed it to the gulp-handlebars configuration.
If your following a tutorial that uses an old version of the handlebars runtime. Replace handlebars.runtime.js with the latest version from the handlebars website.
I installed handlebars via npm and as soon as I used updated code, it worked perfectly.

Meteor 0.6.5 update breaks router function

I recently updated my meteor app to 0.6.5 and I noticed that the router package is not working properly, so I also did a mrt update, but there are still issues. For example, accessing routes does not render the appropriate template. When I run the router test there is also this issue:
Error: Cannot find module 'connect'
I noticed that there was an update to meteor router, but my app is failing to render the corresponding route-template.
Please let me know if there is a method to fix this issue. Thanks
Meteor Router has been updated to support 0.6.5. Note also that there will be the last (non bugfix) release and there is a new router project called Iron Router that will replace Meteor Router.
Meteor router doesn't yet support 0.6.5. It should do shortly as it just has to be slightly modified to work with the new version of meteor containing the linker branch. Why not consider the move to iron-router.
Tom Coleman (author of meteor-router) & Chris Mather worked to build it. It is compatible with 0.6.5
In the meantime, and more generally for mrt packages, you may need to downgrade to 0.6.4.1 until the package author has had a chance to update to the new package API that is part of 0.6.5. You can find instructions here - https://groups.google.com/d/topic/meteor-talk/BbrjGcGGIzc/discussion

Resources