Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Meteor &引用;*架构不允许使用;_Meteor_Telescope - Fatal编程技术网

Meteor &引用;*架构不允许使用;

Meteor &引用;*架构不允许使用;,meteor,telescope,Meteor,Telescope,我对望远镜和流星相当陌生 我添加了一个自定义字段,如下所示: Users.addField({ fieldName: 'apiToken', fieldSchema: { type: String, autoform: { group: 'API Token', label: 'Token' }, optional: true, editableBy:

我对望远镜和流星相当陌生

我添加了一个自定义字段,如下所示:

Users.addField({
    fieldName: 'apiToken',
    fieldSchema: {
        type: String,
        autoform: {
            group: 'API Token',
            label: 'Token'
        },
        optional: true,
        editableBy: ["member", "manager", "admin"]
    }
});
我得到了要显示在用户设置中的字段, 但每当我尝试输入某个内容并提交时, 它给了我一个错误“
apiToken不被模式所允许”

我不确定这是望远镜问题还是流星问题

我需要在MongoDB中编辑模式吗?

多亏了

向望远镜添加新字段时,必须在客户端和服务器上声明它

package.js

Package.onUse(function (api) {
    // client
    api.addFiles([
        "strawberry_fields.js"
    ], "client");

    // server
    api.addFiles([
        "strawberry_fields.js"
    ], "server");
}
Users.addField({
    fieldName: 'Likes strawberries',
    fieldSchema: {
        type: String,
        autoform: {
            group: 'Strawberries',
            label: 'Strawberries'
        },
        optional: true,
        editableBy: ["member", "manager", "admin"]
    }
});
草莓田.js

Package.onUse(function (api) {
    // client
    api.addFiles([
        "strawberry_fields.js"
    ], "client");

    // server
    api.addFiles([
        "strawberry_fields.js"
    ], "server");
}
Users.addField({
    fieldName: 'Likes strawberries',
    fieldSchema: {
        type: String,
        autoform: {
            group: 'Strawberries',
            label: 'Strawberries'
        },
        optional: true,
        editableBy: ["member", "manager", "admin"]
    }
});