samarsault / noodle

Learning management system
4 stars 5 forks source link

Something is breaking #67

Closed Devanshu24 closed 4 years ago

Devanshu24 commented 4 years ago

When we run npm start We

$ npm start
> cte@0.0.0 start /home/think__tech/Desktop/cte
> node ./bin/www

Started on http://localhost:3000
GET / 200 246.179 ms - 6244
GET /javascripts/nav.js 304 5.742 ms - -
GET /stylesheets/home.css 200 17.995 ms - -
GET /stylesheets/main.css 200 21.119 ms - -
GET /logo.png 304 3.005 ms - -
GET /images/facts.png 304 2.430 ms - -
GET /favicon.ico 500 5.510 ms - 2343
TypeError: Cannot set property 'message' of undefined
    at /home/think__tech/Desktop/cte/app.js:93:24
    at Layer.handle [as handle_request] (/home/think__tech/Desktop/cte/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/think__tech/Desktop/cte/node_modules/express/lib/router/index.js:317:13)
    at /home/think__tech/Desktop/cte/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/think__tech/Desktop/cte/node_modules/express/lib/router/index.js:335:12)
    at next (/home/think__tech/Desktop/cte/node_modules/express/lib/router/index.js:275:10)
    at /home/think__tech/Desktop/cte/node_modules/express/lib/router/index.js:635:15
    at next (/home/think__tech/Desktop/cte/node_modules/express/lib/router/index.js:260:14)
    at Function.handle (/home/think__tech/Desktop/cte/node_modules/express/lib/router/index.js:174:3)
    at router (/home/think__tech/Desktop/cte/node_modules/express/lib/router/index.js:47:12)
    at Layer.handle [as handle_request] (/home/think__tech/Desktop/cte/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/think__tech/Desktop/cte/node_modules/express/lib/router/index.js:317:13)
    at /home/think__tech/Desktop/cte/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/think__tech/Desktop/cte/node_modules/express/lib/router/index.js:335:12)
    at next (/home/think__tech/Desktop/cte/node_modules/express/lib/router/index.js:275:10)
    at SendStream.error (/home/think__tech/Desktop/cte/node_modules/serve-static/index.js:121:7)
    at SendStream.emit (events.js:315:20)
    at SendStream.error (/home/think__tech/Desktop/cte/node_modules/send/index.js:270:17)
    at SendStream.onStatError (/home/think__tech/Desktop/cte/node_modules/send/index.js:421:12)
    at onstat (/home/think__tech/Desktop/cte/node_modules/send/index.js:727:26)
    at FSReqCallback.oncomplete (fs.js:167:21)
^C

Upon running git bisect I found this is the first wrong commit

28e9a1ba78939932bdb8f46dc039ea5850374927 is the first bad commit
commit 28e9a1ba78939932bdb8f46dc039ea5850374927
Author: Samarjeet <thelehhman@gmail.com>
Date:   Sat Jun 13 02:00:42 2020 +0530

    Fix lint errors on server

:100644 100644 0e55f04cb0a0be9569bb5ba384c792d8365d97aa 577a53ca8992e2200f26095e02ea744fb22dbc2f M  app.js
:100644 100644 79f1bd50e774643e4381b686d3fe5490bde7d3ce 661fcd785323d3810975637480d47c35b4308c50 M  configure.js
:040000 040000 dc6b8325586bed7d2ae85f2d07c3948102bd303d 7af3f7487a22191032a0aca6a080b1864008054e M  models
:100644 100644 e611ebbaf254dffd14089bd0b1e0c4d0fe7a6311 da2bcb450b1e25432e67f75f9572a8ac52ffec4d M  package-lock.json
:100644 100644 da8a3b35ba58746896d1074f67c873c6a99404a5 998d2e6a9e162fd5030881cf392013273d8f06c0 M  package.json
:040000 040000 3969aa224b895ca969daf067252af80cb076481b ef862e26dd133a16f6044e64feb867341ece4533 M  routes
:040000 040000 baaf7f0613cb976d4e37b516190e187c166bb8e3 c75b9a29baacbc58e64bc50f446b72603f48f81d M  services
:040000 040000 cb1a17248910bee55d7932665d44f8d95cc1e038 f1734e5b899ce2e4e7bdc26c8e837e7f531c26dc M  test

I am not sure what end problem this causes, but there are a few glitches here and there that were previously absent There were a lot of changes made in that commit, so I couldn't pinpoint what is causing the trouble Maybe you could help @thelehhman

PS: A screenshot to see the whole error in one go Screenshot from 2020-06-13 22-33-16

samarsault commented 4 years ago

When do you get this error? It's working fine for me. What's your node version?

Devanshu24 commented 4 years ago

Strange, for me it's happening at https://github.com/thelehhman/cte/commit/28e9a1ba78939932bdb8f46dc039ea5850374927 and not happening at https://github.com/thelehhman/cte/commit/77720bb5ba421e1bbc53902cc44916589b21be84 PS: they are consecutive Node version: v12.18.0

samarsault commented 4 years ago

Well apparently, adding the redundant next fixes this.

samarsault commented 4 years ago

Check if its resolved

Devanshu24 commented 4 years ago

Yes it is Any reason for this though?