I tried to install Kadira on a meteor application.
mrt add kadira
Ok
Kadira.connect('<appId>', '<appSecret>')
Ok
But, this is the error I have :
app/server/kadira.js:7
console.log( Kadira );
^
ReferenceError: Kadira is not defined
at app/server/kadira.js:7:16
at null._onTimeout (packages/underscore/underscore.js:673)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
=> Exited with code: 8
And I don't understand how this is possible.
I checked the package and it exports the namespace as it should :
Package.on_use(function(api) {
configurePackage(api);
api.export(['Kadira']);
});
Meteorite can sometimes be a little quirky.
Check your smart.json to see if it contains kadira
Check .meteor/packages to see if it contains kadira, if not add it.
Delete smart.lock and run mrt install once more.
Related
I'm trying to implement the accounts-ui in a mobile angular-meteor app. I have all the dependencies installed, and I'm trying to setup the Accounts.ui.config with the following code:
import { Accounts } from 'meteor/accounts-base';
Accounts.ui.config({
passwordSignupFields: 'USERNAME_AND_EMAIL'
});
But when I try to run the app, I get the following error:
TypeError: Cannot read property 'config' of undefined
at meteorInstall.server.auth.js (server/auth.js:4:1)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
at server/publications.js:124:1
at /home/ubuntu/workspace/musiker/.meteor/local/build/programs/server/boot.js:297:10
at Array.forEach (native)
at Function._.each._.forEach (/home/ubuntu/.meteor/packages/meteor- tool/.1.4.0.hylsrj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
at /home/ubuntu/workspace/musiker/.meteor/local/build/programs/server/boot.js:133:5
I thought maybe I need to import accounts-ui for the page, but the docs clearly show importing the account-base. I also tried importing the accouns-ui and I still got the same error.
Thank!
-Erick
Add accounts package before using this.
Use this command in the project root to add the package
meteor add accounts-ui accounts-password
This should make your code work.
You need to add the config on client side code :
import { Accounts } from 'meteor/accounts-base';
Accounts.ui.config({
passwordSignupFields: 'USERNAME_ONLY',
});
Have a look here for more details.
It looks like you are trying to execute Accounts.ui.config on the server but this function is only available on the client.
It is Accounts.config.
Accounts.config({
passwordSignupFields: 'USERNAME_AND_EMAIL'
});
I have the same error.
First I put the JS into lib/startup/accounts-config.js or lib/accounts-config.js ,it still has error.
But it becomes effective when I put the JS into imports/startup/accounts-config.js. I don't know the reason.
I was working on a project using version 0.9.3.1 of Meteor. I've just upgraded to version 1.2.0.1 in order to resume my project.
I've installed the latest version of meteor-roles by running meteor add alanning:roles so that should be up to date. I've had a look at the docs but that hasn't really helped.
Anyone got any ideas on what this error is and how to resolve it?
Exception in template helper: ReferenceError: Match is not defined
at Object.Roles._uiHelpers.isInRole (http://localhost:3000/packages/alanning_roles.js?0f20b892d4a0a11a6ea8431da3d0a0953ba951a9:809:10)
at bindDataContext (http://localhost:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:2986:16)
at Blaze._wrapCatchingExceptions (http://localhost:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:1650:16)
at http://localhost:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:3038:66
at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:3671:12)
at wrapHelper (http://localhost:3000/packages/blaze.js?9391df93ba5076c2cfc61ee68724eb79b65f00d9:3037:27)
at Spacebars.call (http://localhost:3000/packages/spacebars.js?1aedcc2aa3ae9ff5d860d73516110cedd77c033e:167:18)
at Spacebars.mustacheImpl (http://localhost:3000/packages/spacebars.js?1aedcc2aa3ae9ff5d860d73516110cedd77c033e:104:25)
at Object.Spacebars.dataMustache (http://localhost:3000/packages/spacebars.js?1aedcc2aa3ae9ff5d860d73516110cedd77c033e:136:39)
at http://localhost:3000/app/client/layout/adminlayout.compiled.html.js?c582d42dde65584f4e6c48e70d8d65fa2cba7589:6:22
I believe that this open issue on GitHub against alanning:roles has the clue you are looking for. You may need to install the check package as it may be an undeclared dependency.
$ meteor add check
challett appears to have fixed this issue:
https://github.com/challett/meteor-roles/commit/dfd967e1e2ea27dc20b34e2bd17f38de70ebed72
//roles/package.js
Package.describe({
summary: "Authorization package for Meteor",
- version: "1.2.12",
+ version: "1.2.13",
git: "https://github.com/alanning/meteor-roles.git",
name: "alanning:roles"
});
## -8,7 +8,7 ## Package.describe({
Package.on_use(function (api) {
api.versionsFrom && api.versionsFrom("METEOR#0.9.0");
var both = ['client', 'server'];
- api.use(['underscore', 'accounts-base'], both);
+ api.use(['underscore', 'accounts-base', 'check'], both);
api.use(['handlebars'], 'client', {weak: true});
So I've done the todo and leaderboard tutorials and now am excited to begin routing - seems like iron router is the way to go so I install it to my project using
mrt add iron-router
Seems to install ok so I start meteor and navigate to localhost:3000 and my console lights up with:
Uncaught TypeError: undefined is not a function
helpers.js:141 Uncaught TypeError: Cannot read property 'prototype' of undefined
router.js:61 Uncaught TypeError: undefined is not a function
global-imports.js?784bc180a149e4c10dff977a7f114df67d9952c6:3 Uncaught TypeError: Cannot read property 'RouteController' of undefined
template.tutorialexample.js?e119ff8df948cfe8167f49eb28794995a594841c:2 Uncaught ReferenceError: Template is not defined
tutorialexample.js?a4ef596255404350be2cc45303caea02f934cd17:1 Uncaught ReferenceError: Meteor is not defined
Mind you this is a default app, haven't touched a thing.
So if someone could point me in the right direction that would be great. I did read somewhere that I should be using 0.8.2 version of iron router - and I then did change my smart.json file to contain:
{
"packages": {
"iron-router": "0.8.2"
}
}
and then did meteor update etc but still no luck. So any help anyone could provide would be great.
Meteor has changed quite a bit & the instructions/tutorial you've been following is a bit dated.
Previously mrt was part of the meteorite packaging system, from Meteor 0.9.0 it has been integrated directly into meteor.
So now you do:
meteor add iron:router
To add it to your project. Once you start your app up it should present a basic template on how to use it.
Since I updated meteor to 0.8.3 I'm getting following error.
ReferenceError: Spacebars is not defined
at Package (packages/compiler/compiler.js:2)
at /home/cis/work/meteor/heber/zzbase-meteor/.meteor/local/build/programs/server/packages/comp
at /home/cis/work/meteor/heber/zzbase-meteor/.meteor/local/build/programs/server/packages/comp
at /home/cis/work/meteor/heber/zzbase-meteor/.meteor/local/build/programs/server/boot.js:161:1
at Array.forEach (native)
at Function._.each._.forEach (/home/cis/.meteor/tools/cef2bcd356/lib/node_modules/underscore/u
at /home/cis/work/meteor/heber/zzbase-meteor/.meteor/local/build/programs/server/boot.js:82:5
I have following packages:
accounts-ui , accounts-google, bootstrap-3, email, standard-app-packages, d3, compiler,
amplify, ace, blaze-layout, iron-router, backbone
Please help me, I'm stuck in last 5 days. :(
go to your project dir, and try running mrt update
Had the same problem. Ended up doing a new meteor create then did all the required mrt adds... copied the folders there. I saw a post on the Google Group suggesting removing everything in the /packages folder then running mrt update.
i try to deploy my meteor application, but it still fail. I use meteor 0.6.1, and its package system.
in my root app, i created the following file tree :
packages
cheerio
package.js
iconv-lite
package.js
here is the content of the package.js :
Package.describe({
summary: 'Cheerio, an html parser with Jquery like API, but server side'
});
Npm.depends({cheerio: '0.10.8'});
and
Package.describe({
summary: 'Encoding management'
});
Npm.depends({'iconv-lite': '0.2.7'});
Then i do a meteor deploy appName, and then a meteor logs appName
and here is the error :
[Tue Apr 09 2013 13:14:59 GMT+0000 (UTC)] INFO ReferenceError: module is not defined
at app/packages/cheerio/index.js:5:11
at /meteor/containers/72e47bd9-1446-3b0f-126d-113dfb566c3c/bundle/server/server.js:282:7
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.0/lib/node_modules/underscore/underscore.js:79:11)
at run (/meteor/containers/72e47bd9-1446-3b0f-126d-113dfb566c3c/bundle/server/server.js:227:7)
So i get a problem because the var module is not defined in the js file.
I don't know what to do, and any help would be great.
Thanks
Based on this website: meteor-npm-integration, i wrote a little subject to explain a little bit more the system of meteor Npm package: tumblr.
I think you still need at least one js file that you add using api.add_files from package.js, which you have it doing the Npm.require