Guest User

Untitled

a guest
Apr 12th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. Error:
  2.  
  3. 1. (node:25664) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SequelizeDatabaseError: permission denied for relation Users2
  4. (node:25664) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  5. Solved: check table owner
  6.  
  7. 2. squelize instance before called find...etc
  8. Solved: model path should be correct in
  9. const sequelize = new Sequelize({
  10. database: "Test",
  11. username: "test",
  12. password: "1234",
  13. dialect: "postgres",
  14. port: 5432,
  15. modelPaths: [ __dirname + "/models"] << check here. not "./models" or use sequelize.addModels([Users2]);
  16. });
  17.  
  18. 3. C:\Users\yulan\Documents\Visual Studio Code\node-ts-sequelizejs\node_modules\sequelize-typescript\lib\models\v4\Sequelize.js:53
  19. throw new Error(`@Table annotation is missing on class "${model['name']}"`);
  20. ^
  21.  
  22. Error: @Table annotation is missing on class "users"
  23. at models.forEach.model (C:\Users\yulan\Documents\Visual Studio Code\node-ts-sequelizejs\node_modules\sequelize-typescript\lib\models\v4\Sequelize.js:53:23)
  24. at Array.forEach (<anonymous>)
  25. at Sequelize.defineModels (C
  26. solved: /models has some classes without @table
Add Comment
Please, Sign In to add comment