Finalizei o capítulo 5 seguindo todas as instruções para inicializar os módulos via sequelize, porém apresenta o erro abaixo:
npm start
> ntask-api@1.0.0 start /home/developer/Documentos/NodeApi/ntask-api
> babel-node index.js
consign v0.1.2 Initialized in /home/developer/Documentos/NodeApi/ntask-api
+ ./libs/config.js
+ ./db.js
+ ./libs/middlewares.js
+ ./routes/index.js
+ ./routes/tasks.js
+ ./libs/boot.js
/home/developer/Documentos/NodeApi/ntask-api/node_modules/sequelize/lib/model.js:95
throw new Error('Unrecognized data type for field ' + name);
^
Error: Unrecognized data type for field classMethods
at Model.<anonymous> (/home/developer/Documentos/NodeApi/ntask-api/node_modules/sequelize/lib/model.js:95:13)
at /home/developer/Documentos/NodeApi/ntask-api/node_modules/sequelize/node_modules/lodash/lodash.js:12666:23
at /home/developer/Documentos/NodeApi/ntask-api/node_modules/sequelize/node_modules/lodash/lodash.js:4389:15
at baseForOwn (/home/developer/Documentos/NodeApi/ntask-api/node_modules/sequelize/node_modules/lodash/lodash.js:2652:24)
at Function.mapValues (/home/developer/Documentos/NodeApi/ntask-api/node_modules/sequelize/node_modules/lodash/lodash.js:12665:7)
at new Model (/home/developer/Documentos/NodeApi/ntask-api/node_modules/sequelize/lib/model.js:78:43)
at Sequelize.define (/home/developer/Documentos/NodeApi/ntask-api/node_modules/sequelize/lib/sequelize.js:631:15)
at module.exports (/home/developer/Documentos/NodeApi/ntask-api/models/tasks.js:2:29)
at Sequelize.import (/home/developer/Documentos/NodeApi/ntask-api/node_modules/sequelize/lib/sequelize.js:691:30)
at /home/developer/Documentos/NodeApi/ntask-api/db.js:24:27
at Array.forEach (native)
at Function.module.exports (/home/developer/Documentos/NodeApi/ntask-api/db.js:22:29)
at Consign.into (/home/developer/Documentos/NodeApi/ntask-api/node_modules/consign/lib/consign.js:239:17)
at Object.<anonymous> (/home/developer/Documentos/NodeApi/ntask-api/index.js:12:6)
at Module._compile (module.js:570:32)
at loader (/home/developer/Documentos/NodeApi/ntask-api/node_modules/babel-register/lib/node.js:144:5)
npm ERR! Linux 4.10.0-37-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.11.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! ntask-api@1.0.0 start: `babel-node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ntask-api@1.0.0 start script 'babel-node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ntask-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ntask-api
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ntask-api
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/developer/Documentos/NodeApi/ntask-api/npm-debug.log
Disponibilizei o código do que foi feito até o momento no github(commit Fim do capítulo 5):