I am new in meteor. I am using simple schema for quickForm and got this error. Exception in template helper: TypeError: Cannot read property 'mergedSchema' of undefined
main.html
<template name="hello">
<button>Click Me</button>
<p>You've pressed the button {{counter}} times.</p>
{{> quickForm collection="Books" id="bookUpdateForm" type="insert"}}
</template>
main.js
import './hello.html';
import { Books } from '../../../api/links/books.js';
Template.hello.onCreated(function () {
Meteor.subscribe('books');
});
Collection JS
import SimpleSchema from 'simpl-schema';
export const Books = new Mongo.Collection("books");
const Book = new SimpleSchema({
title: {
type: String,
label: "Title",
max: 200
},
author: {
type: String,
label: "Author"
},
copies: {
type: SimpleSchema.Integer,
label: "Number of copies",
min: 0
},
lastCheckedOut: {
type: Date,
label: "Last date this book was checked out",
optional: true
},
summary: {
type: String,
label: "Brief summary",
optional: true,
max: 1000
}
});
Books.attachSchema(Book);