Search code examples
sequelize-cli

ERROR: Attribute '' cannot be parsed: Cannot read property 'dataType' of undefined


I was creating document_types table using following cli command

sequelize model:create --name User --attributes name:string, username:string, email:string, password:string

Solution

  • Solution: remove the space after comma between different attributes to avoid the error, correct command would be:

    sequelize model:create --name User --attributes name:string,username:string,email:string,password:string