ReferenceError, spacebars is undefined - meteor

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.

Related

Meteor package still giving error even though the packages has not been added

I keep getting the error in console
W20150601-13:28:19.607(-4)? (STDERR) The spacjamio:chai package has been renamed to practicalmeteor:chai. Please use the new package name instead.
But the spacjamio:chai package has not been added to my project. Why do I keep getting this message?
When I search the hidden meteor build folder I do see a js file for the spacjamio:chai package. Do I just delete this?
Here is my package list
meteor-platform
accounts-password
stylus
mquandalle:jade
coffeescript
sacha:spin
natestrauser:font-awesome
multiply:iron-router-progress
iron:router
alanning:roles
twbs:bootstrap
msavin:mongol
msavin:jetsetter
random
cmather:handlebars-server
email
mrt:moment
themeteorchef:bert
cunneen:mailgun
ian:accounts-ui-bootstrap-3
aldeed:simple-schema
zimme:collection-timestampable
aldeed:collection2
mike:mocha
practicalmeteor:chai
UPDATE:
The error seems to stop when I remove the mike:mocha package. But mike:mocha package seems to require the newest name for chai package.
If you didn't add it and don't need it, I'd just remove it with...
meteor remove practialmeteor:chai
in the console. Worth a shot at least, if it breaks stuff you can always add it back.

Install of Iron Router for Meteor 1.0.2.1 just does not work

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.

Updating to Meteor 0.9.1 woes (broke the app big time)

I’ve had some serious problems after updating meteor to 0.9.1.
Here are some example errors from the console.
Uncaught TypeError: undefined is not a function -- in dynamic_template.js
Uncaught TypeError: Cannot read property ‘prototype’ of undefined -- in helpers.js
Uncaught TypeError: undefined is not a function -- in router.js
Uncaught TypeError: Cannot read property ‘RouteController’ of undefined -- in iron-router-progress.js
Uncaught TypeError: Cannot read property ‘RouteController’ of undefined -- in global-imports.js
And dozens of: Uncaught ReferenceError: Template is not defined -- in client view js files, both the hard copies that I have created and the apparently ephemeral files that meteor apparently creates on the fly.
And fewer dozens of: Uncaught ReferenceError: Meteor is not defined -- in the same kind of files.
And one: Uncaught ReferenceError: Spacebars is not defined -- in login_buttons_dialogs.html
And about 10 sockjs errors on GET — net:ERR_CONNECTION_REFUSED
I can’t help thinking that either something very basic was not accomplished during the update procedure or there are some very basic and widespread changes that need to be made in my code in order for it to run 0.9.1.
I’m building a app that is an extension and morph of the microscope app. It's not rocket science at this point. It was working last night before the update. It was 0.9.0.1 before the update.
All help and insight is appreciated.
Thanks for the guidance. All seems to be well now. This is what I did:
I created a new meteor app, removed 2 default packages, then added:
bootstrap
iron:router
mrt:accounts-ui-bootstrap-dropdown
accounts-password
mrt:iron-router-progress
sacha:spin
Then I copied my files from the broken app to the new app and viola', everything worked.
I see that the directory structure and its naming conventions have changed, colons in place of dashes in a few spaces and the direcory or namespace prefixes such as mrt, iron, and sacha.
Here's an unexpected thing. I previously had a folder called packages in which there was a folder for each package containing all its files. Now that folder is empty, but everything is still working. I'm clearly under informed about a few things.
Again, thanks for the guidance. Even though this was a pain, I see that the resulting changes needed to happen.
Best, Alex
Many packages are breaking on Meteor#0.9.1, I suggest you create a new Meteor app like so:
$ meteor create --release 0.9.0 app
$ cd app
$ meteor remove insecure
$ meteor remove autopublish
and then add all the packages you need with meteor add packagename and copy over all the files from your app.
Stick with Meteor#0.9.0 until you know you can safely upgrade!

Meteor : ReferenceError: Kadira is not defined

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.

meteor deploying with 0.6.5

After I updated my Meteor app to 0.6.5 using
meteor update
and deployed it to my shared server (webfaction). I have a new error that appeared without me changing the application :
/home/me/webapps/meteor/bundle/programs/server/boot.js:184
}).run();
^
Error: a route URL prefix must begin with a slash
at _.extend.declare (packages/routepolicy/routepolicy.js:95)
at new StreamServer (packages/livedata/stream_server.js:23)
at new Server (packages/livedata/livedata_server.js:1029)
at Package (packages/livedata/server_convenience.js:10)
at packages/livedata.js:3907:4
at packages/livedata.js:3918:3
at /home/me/webapps/meteor/bundle/programs/server/boot.js:153:10
at Array.forEach (native)
at Function._.each._.forEach (/home/me/webapps/meteor/bundle/programs/server/node_modules/underscore/underscore.js:79:11)
at /home/me/webapps/meteor/bundle/programs/server/boot.js:80:5
Downgrading to 0.6.4.1 fixes the issue.
I would very much like to understand why the error is coming with 0.6.5
Check your ROOT_URL. Make sure it starts with http://
It might have something to do with changes to the package API in 0.6.5. See the release notes - http://www.meteor.com/blog/2013/08/14/meteor-065-namespacing-modularity-new-build-system-source-maps
And this meteor-talk thread - https://groups.google.com/d/topic/meteor-talk/BbrjGcGGIzc/discussion

Resources