Hi,
Thanks for the wonderful annotation tool. I am facing an issue when I fire up the server and try to sign up an user. I am getting the following error.
❯ PORT=3000 npm start
> partnet_anno_system_backend@0.0.0 start /Users/abhishekm/Desktop/Projects/partnet_anno_system/server
> node ./bin/www
GET / 304 246.356 ms - -
GET /css/style.css 304 1.763 ms - -
GET /client/js/validator.min.js 200 4.268 ms - 26828
GET /client/login.js 304 3.756 ms - -
express deprecated res.send(body, status): Use res.status(status).send(body) instead app.js:63:9
GET /favicon.ico 404 1.438 ms - 15
(node:6976) [DEP0095] DeprecationWarning: timers.enroll() is deprecated. Please use setTimeout instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:6976) [DEP0126] DeprecationWarning: timers.active() is deprecated. Please use timeout.refresh() instead.
[ connect error ]
/Users/abhishekm/Desktop/Projects/partnet_anno_system/server/routes/user.js:89
connection.query(query, function (error, results, field) {
^
TypeError: Cannot read properties of undefined (reading 'query')
at /Users/abhishekm/Desktop/Projects/partnet_anno_system/server/routes/user.js:89:20
at Handshake.onConnect [as _callback] (/Users/abhishekm/Desktop/Projects/partnet_anno_system/server/node_modules/mysql/lib/Pool.js:58:9)
at Handshake.Sequence.end (/Users/abhishekm/Desktop/Projects/partnet_anno_system/server/node_modules/mysql/lib/protocol/sequences/Sequence.js:88:24)
at Protocol.handleNetworkError (/Users/abhishekm/Desktop/Projects/partnet_anno_system/server/node_modules/mysql/lib/protocol/Protocol.js:363:14)
at PoolConnection.Connection._handleNetworkError (/Users/abhishekm/Desktop/Projects/partnet_anno_system/server/node_modules/mysql/lib/Connection.js:428:18)
at Socket.emit (node:events:390:28)
at emitErrorNT (node:internal/streams/destroy:164:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Node.js v17.3.1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! partnet_anno_system_backend@0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the partnet_anno_system_backend@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/abhishekm/.npm/_logs/2022-01-12T14_09_32_261Z-debug.log
I am unable to understand where should I define connection. I don't have a javascript background, so the solution might be trivial but I am unable to solve it. Any help is very appreciated!
Thank you
Hi, Thanks for the wonderful annotation tool. I am facing an issue when I fire up the server and try to sign up an user. I am getting the following error.
I am unable to understand where should I define
connection
. I don't have a javascript background, so the solution might be trivial but I am unable to solve it. Any help is very appreciated! Thank you