0
Hello guys I’m having the following problem, my Node is accusing error:
ReferenceError: Cannot access 'user' before initialization
I am working with Schema user record in the case below I show a POST:
app.post('/register', (req,res) =>{
const {nomecompleto,email,password} = req.body
const user = new user({nomecompleto,email,password})
})
I’m importing the model user file that looked like this const User = Require('./model/user')
I have tried several actions to correct more it still gives error on line 36 in the case when we put the const