当我尝试导航到路线时,我收到以下错误。这在Meteor的0.9.3.1版本上运行良好,但在最近将我的项目升级并重新开发到最新版本的Meteor后,我遇到了一些问题。
这是导致问题的模板:
<template name="addCompetition">
{{#autoForm collection="Competitions" id="addCompetition" type="insert"}}
<fieldset>
<legend>Add a Competition</legend>
{{> afQuickField name='correctEntry'}}
{{> afQuickField name='prizeFund'}}
{{> cfsFileField name="imageId" collection="competitionimages"}}
</fieldset>
<button type="submit" class="btn btn-primary">Insert</button>
{{/autoForm}}
</template>
错误:
Exception from Tracker recompute function:
debug.js:41 Error: No such template: cfsFileField
at Blaze.View.lookup (lookup.js:184)
at null.<anonymous> (spacebars-runtime.js:32)
at view.js:199
at Function.Template._withTemplateInstanceFunc (template.js:457)
at view.js:197
at Object.Blaze._withCurrentView (view.js:538)
at viewAutorun (view.js:196)
at Tracker.Computation._compute (tracker.js:323)
at new Tracker.Computation (tracker.js:211)
at Object.Tracker.autorun (tracker.js:562)
知道为什么会这样吗?
这是meteor list
:
accounts-password 1.1.3 Password support for accounts
accounts-ui 1.1.6 Simple templates to add login widgets to an app
alanning:roles 1.2.13+ Authorization package for Meteor
aldeed:autoform 5.5.1 Easily create forms with automatic insert and update, and automatic reactive...
aldeed:collection2 2.5.0 Automatic validation of insert and update operations on the client and server.
aldeed:simple-schema 1.3.3 A simple schema validation object with reactivity. Used by collection2 and a...
blaze-html-templates 1.0.1 Compile HTML templates into reactive UI with Meteor Blaze
cfs:autoform 2.2.1 Upload files as part of autoform submission
cfs:filesystem 0.1.2 Filesystem storage adapter for CollectionFS
cfs:gridfs 0.0.33 GridFS storage adapter for CollectionFS
cfs:standard-packages 0.5.9 Filesystem for Meteor, collectionFS
ecmascript 0.1.5 Compiler plugin that supports ES2015+ in all .js files
ejson 1.0.7 Extended and Extensible JSON library
es5-shim 4.1.13 Shims and polyfills to improve ECMAScript 5 support
insecure 1.0.4 (For prototyping only) Allow all database writes from the client
iron:router 1.0.9 Routing specifically designed for Meteor
jquery 1.11.4 Manipulate the DOM using CSS selectors
matb33:collection-hooks 0.8.0 Extends Mongo.Collection with before/after hooks for insert/update/remove/fi...
meteor-base 1.0.1 Packages that every Meteor app needs
meteorhacks:npm 1.5.0 Use npm modules with your Meteor App
mobile-experience 1.0.1 Packages for a great mobile user experience
mongo 1.1.2 Adaptor for using MongoDB and Minimongo over DDP
mrt:accounts-admin-ui-bootstrap-3 0.2.7 A roles based account management system using bootstrap 3
mrt:jquery-jcrop 0.0.3 jQuery Jcrop repackaged for Meteor
mrt:loading 0.0.1 Loading overlay + spinner
npm-container 1.2.0+ Contains all your npm dependencies
random 1.0.4 Random number generator and utilities
session 1.1.1 Session variable
spacebars 1.0.7 Handlebars-like template language for Meteor
standard-minifiers 1.0.1 Standard minifiers used with Meteor apps by default.
tracker 1.0.9 Dependency tracker to allow reactive callbacks
twbs:bootstrap 3.3.5 The most popular front-end framework for developing responsive, mobile first...
答案 0 :(得分:1)
https://github.com/aldeed/meteor-cfs-autoform
cfsFileField
被贬低,现在应该是这样的:
{{> afQuickField name="imageId" type="cfs-file" collection="competitionimages"}}