
Full Stack Web App using Vue.js & Express.js: Part 2 - Sequelize
video description
Date: 2022-03-14
Related videos
Comments and reviews: 10
Kentaro
From my observation, people are having issues with query at 14:30 not running / Cannot read property 'create' of undefined. 2 things to watch:
1) In your index.js make sure you have .filter(file => file !== -index.js') and not .filter(file => - file !== 'index.js'))
2) Try using const model = require(path.join(__dirname, file))(sequelize, Sequelize) instead of const model = sequelize.import(path.join(__dirname, file))
Another thing you might want to watch:
1) version compatibility of your node and sqlite
2) for message: -please install sqlite3 package manually-, I'd suggesting uninstalling sequalize and sqlite and running: npm i sequalize sqlite3
reply
From my observation, people are having issues with query at 14:30 not running / Cannot read property 'create' of undefined. 2 things to watch:
1) In your index.js make sure you have .filter(file => file !== -index.js') and not .filter(file => - file !== 'index.js'))
2) Try using const model = require(path.join(__dirname, file))(sequelize, Sequelize) instead of const model = sequelize.import(path.join(__dirname, file))
Another thing you might want to watch:
1) version compatibility of your node and sqlite
2) for message: -please install sqlite3 package manually-, I'd suggesting uninstalling sequalize and sqlite and running: npm i sequalize sqlite3
reply
Dusan
Thank you for an impressive effort in this entire series of films. Real-time programming/execution with constructive and clear explanations and examples. Most educational sources are rewarding solely depending on how much you want/are willing to learn.
Those who did not like the movie/series would simply continue to watch cute kittens, sell cars/insurance, or whatever they are really doing ...
reply
Thank you for an impressive effort in this entire series of films. Real-time programming/execution with constructive and clear explanations and examples. Most educational sources are rewarding solely depending on how much you want/are willing to learn.
Those who did not like the movie/series would simply continue to watch cute kittens, sell cars/insurance, or whatever they are really doing ...
reply
iheb
Am I the only one having a problem with getting a unique email constraint working ?! I've been looking for a solution and I think its a sequelize issue and I have to add some code for it to work
queryInterface.addIndex()
Did anyone else had the same issue ?!
and about the error message, how can we change it dynamically so that it returns a message depends on the error
reply
Am I the only one having a problem with getting a unique email constraint working ?! I've been looking for a solution and I think its a sequelize issue and I have to add some code for it to work
queryInterface.addIndex()
Did anyone else had the same issue ?!
and about the error message, how can we change it dynamically so that it returns a message depends on the error
reply
Ernie
Just found this tutorial and wondering if anyone has completed it recently? I want to learn more about connecting Vue & Node to SQL databases but I'm hesitant to start it because of the many issues related to changes in sqlite & sequelize. Have you guys been able to solve these issues? I'm pretty comfortable with Vue and Vuetify so not worried about changes from that end.
reply
Just found this tutorial and wondering if anyone has completed it recently? I want to learn more about connecting Vue & Node to SQL databases but I'm hesitant to start it because of the many issues related to changes in sqlite & sequelize. Have you guys been able to solve these issues? I'm pretty comfortable with Vue and Vuetify so not worried about changes from that end.
reply
Иван
While repeating got an error -Joi.validate is not a function-
This is how I made it work:
first of all I changed declaration of schema like
const schema = Joi.object(-
email: Joi.string().email(),
password: Joi.string().regex(
new RegExp(--[a-zA-Z0-9--8,32-$-)
)
-)
Then I changed validation
const -error- = schema.validate(req.body)
reply
While repeating got an error -Joi.validate is not a function-
This is how I made it work:
first of all I changed declaration of schema like
const schema = Joi.object(-
email: Joi.string().email(),
password: Joi.string().regex(
new RegExp(--[a-zA-Z0-9--8,32-$-)
)
-)
Then I changed validation
const -error- = schema.validate(req.body)
reply
mamadou
Hello, thanks for the course. I have a problem with sequelize.import() he don't work and the website says he is deprecated i replace it with require but nothing. And if he don't work, i can't create a user , he send me an error like -can't read property create of undefined- the -undefined- is the User model we use to create a user. Thnaks
reply
Hello, thanks for the course. I have a problem with sequelize.import() he don't work and the website says he is deprecated i replace it with require but nothing. And if he don't work, i can't create a user , he send me an error like -can't read property create of undefined- the -undefined- is the User model we use to create a user. Thnaks
reply
Ben
Hi, thanks for another great video. Is there a reason to use routes and controllers? I started working with express.Router so I just have my routes folder and in each file just the functions involved with the route. Is it just a coding style question or does this approach have advantages?
Thanks!
reply
Hi, thanks for another great video. Is there a reason to use routes and controllers? I started working with express.Router so I just have my routes folder and in each file just the functions involved with the route. Is it just a coding style question or does this approach have advantages?
Thanks!
reply
Carl
A couple of videos in and enjoying this series, thank you. Like the well paced instruction, demo and recap approach taken, and the fact you are taking time to show an iterative dev workflow with git, linting, tidy project setup and building on a SQL db.
reply
A couple of videos in and enjoying this series, thank you. Like the well paced instruction, demo and recap approach taken, and the fact you are taking time to show an iterative dev workflow with git, linting, tidy project setup and building on a SQL db.
reply
Mike
Anyone else getting 'Cannot find module './utils/validator-extras'' error. I found the library and manually created but then got a cannot find './operators' error. Also feel like I shouldn't have had to mess with the node_modules like that anyway.
reply
Anyone else getting 'Cannot find module './utils/validator-extras'' error. I found the library and manually created but then got a cannot find './operators' error. Also feel like I shouldn't have had to mess with the node_modules like that anyway.
reply
Rishi
I am having an error in which constraints stated in User.js file is not been applied on my input.
for Ex. Email should be unique, but it is even accepting duplicate emails. If anyone else also faced these errors kindly help.
reply
I am having an error in which constraints stated in User.js file is not been applied on my input.
for Ex. Email should be unique, but it is even accepting duplicate emails. If anyone else also faced these errors kindly help.
reply
Add a review, comment
Other channel videos















