Error in blog project plz help what is the error?

const {Router}=require(‘express’)
const {
createUser,
authUser,
findUserByToken
}=require(’…/…/controllers/users’)
const route =Router()
route.get(’/’,async(req,res)=>{
let auth=req.headers[‘authorization’]
if(auth.startsWith(‘Token’)){
let token=auth.split(’’)[1]
let user=await findUserByToken(token)
return res.send(user)
}
//based on the token i can find the user
else{
res.status(401).send(
“errors”,{
“body”: [
“Authorization token empty”
]
}

    )
}

})
module.exports={route}

i am getting this error

        "errors":{
        ^^^^^^^^

SyntaxError: missing ) after argument list

please share files after uploading them on github (share github repo link), and screenshot of the error

plz help @Darsh-Pratap-325457197922299

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.
this is the error

this is just the warning, it will not cause your program to fail execution

but the article is not getting added which i am posting through POSTMAN

plz help @Darsh-Pratap-325457197922299

throw er; // Unhandled ‘error’ event
^

Error: listen EADDRINUSE: address already in use :::7878
at Server.setupListenHandle [as _listen2] (net.js:1306:16)
at listenInCluster (net.js:1354:12)
at Server.listen (net.js:1442:7)
at Function.listen (E:\web_dev\blog-project\node_modules\express\lib\application.js:618:24)
at E:\web_dev\blog-project\server.js:9:9
at tryCatcher (E:\web_dev\blog-project\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (E:\web_dev\blog-project\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (E:\web_dev\blog-project\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (E:\web_dev\blog-project\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (E:\web_dev\blog-project\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (E:\web_dev\blog-project\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (E:\web_dev\blog-project\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (E:\web_dev\blog-project\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues (E:\web_dev\blog-project\node_modules\bluebird\js\release\async.js:15:14)
at processImmediate (internal/timers.js:439:21)
Emitted ‘error’ event on Server instance at:
at emitErrorNT (net.js:1333:8)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
code: ‘EADDRINUSE’,
errno: ‘EADDRINUSE’,
syscall: ‘listen’,
address: ‘::’,
port: 7878

it means the server is already in use, change the port number and try again
or first quit each running server and then try again

UnhandledPromiseRejectionWarning: Error: Support for {where: 'raw query'} has been removed.
at MySQLQueryGenerator.whereItemsQuery (E:\web_dev\blog-project\node_modules\sequelize\lib\dialects\abstract\query-generator.js:2162:13)
at MySQLQueryGenerator.getWhereConditions (E:\web_dev\blog-project\node_modules\sequelize\lib\dialects\abstract\query-generator.js:2607:19)
at MySQLQueryGenerator.selectQuery (E:\web_dev\blog-project\node_modules\sequelize\lib\dialects\abstract\query-generator.js:1315:28)
at QueryInterface.select (E:\web_dev\blog-project\node_modules\sequelize\lib\query-interface.js:1122:27)
at E:\web_dev\blog-project\node_modules\sequelize\lib\model.js:1757:34
at tryCatcher (E:\web_dev\blog-project\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (E:\web_dev\blog-project\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (E:\web_dev\blog-project\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (E:\web_dev\blog-project\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (E:\web_dev\blog-project\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (E:\web_dev\blog-project\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (E:\web_dev\blog-project\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (E:\web_dev\blog-project\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (E:\web_dev\blog-project\node_modules\bluebird\js\release\async.js:15:14)
at processImmediate (internal/timers.js:439:21)
(node:840) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:840) [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.

i am getting this error now @Darsh-Pratap-325457197922299

support for raw query in where attribute has been removed, you have to follow the documentation to see what new guidelines are for the where attribute

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.