keystonejs / keystone-classic

Node.js CMS and web app framework
http://v4.keystonejs.com
MIT License
14.65k stars 2.21k forks source link

Model Error keystone 4.0 ReferenceError: Unknown keystone list #4979

Closed felipereyel closed 4 years ago

felipereyel commented 4 years ago

I followed the tutorial to create new models in https://v4.keystonejs.com/getting-started/setting-up/part-2/

Creating a season model:

var keystone = require('keystone');
var Types = keystone.Field.Types;

/**
 * Season Model
 * ==========
 */
var Season = new keystone.List('Season');

Season.add({
    number: {
        type: Types.Text,
    },
    show: {
        type: Types.Relationship,
        ref: 'Show',
    },
});

/**
 * Registration
 */
Season.defaultColumns = 'number, show';
Season.register();

The file is located in the models directory But when I run it with node keystone.js it throws an error: ReferenceError: Unknown keystone list "season"

Software Version
Keystone 4.0
Node.js 13.6.0