I have recently installed a new meteor project, and added iron:router 1.0.9
But when i add route configurations i get a blank page and a console error of:
Exception in callback of async function: ReferenceError: EJSON is not defined
at MiddlewareStack.concat (http://localhost:3000/packages/iron_middleware-stack.js?ff70621b6c5f6a406edc60600c4b76126dae21d6:303:25)
at RouteController._runRoute (http://localhost:3000/packages/iron_router.js?dd5fa02859b6335661b94134bd9903be8eecf44d:542:17)
at Function.Route.dispatch (http://localhost:3000/packages/iron_router.js?dd5fa02859b6335661b94134bd9903be8eecf44d:856:18)
at route (http://localhost:3000/packages/iron_router.js?dd5fa02859b6335661b94134bd9903be8eecf44d:713:11)
at boundNext (http://localhost:3000/packages/iron_middleware-stack.js?ff70621b6c5f6a406edc60600c4b76126dae21d6:425:31)
at Meteor.bindEnvironment (http://localhost:3000/packages/meteor.js?5deab0885176b44ccbbbf0b5101b065971c8f283:999:22)
at dispatch (http://localhost:3000/packages/iron_middleware-stack.js?ff70621b6c5f6a406edc60600c4b76126dae21d6:449:3)
at http://localhost:3000/packages/iron_router.js?dd5fa02859b6335661b94134bd9903be8eecf44d:393:13
at Tracker.Computation._compute (http://localhost:3000/packages/tracker.js?9309a5697855cef52b32921fbc9dcb1017c58b39:349:36)
at new Tracker.Computation (http://localhost:3000/packages/tracker.js?9309a5697855cef52b32921fbc9dcb1017c58b39:237:10)
The only code i have is:
Router.route('/', function () {
this.render('home');
}, {
name: 'home'
});
and
<head>
<title>asm</title>
</head>
<body>
</body>
<template name="home">
<h1>Home</h1>
<p>
Data Title:
</p>
</template>
You need to manually add the ejson
package.
meteor add ejson