sanattaori/techdot

Iam getting this error after entering otp http://localhost:8080/info

Closed this issue · 1 comments

TypeError: Cannot read property ':Voting' of undefined
at C:\Users\vikram\Downloads\techdot-master\index.js:93:53
at Layer.handle [as handle_request] (C:\Users\vikram\Downloads\techdot-master\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Users\vikram\Downloads\techdot-master\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (C:\Users\vikram\Downloads\techdot-master\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (C:\Users\vikram\Downloads\techdot-master\node_modules\express\lib\router\layer.js:95:5)
at C:\Users\vikram\Downloads\techdot-master\node_modules\express\lib\router\index.js:281:22
at Function.process_params (C:\Users\vikram\Downloads\techdot-master\node_modules\express\lib\router\index.js:335:12)
at next (C:\Users\vikram\Downloads\techdot-master\node_modules\express\lib\router\index.js:275:10)
at SendStream.error (C:\Users\vikram\Downloads\techdot-master\node_modules\serve-static\index.js:121:7)
at SendStream.emit (events.js:311:20)
at SendStream.error (C:\Users\vikram\Downloads\techdot-master\node_modules\send\index.js:270:17)
at SendStream.onStatError (C:\Users\vikram\Downloads\techdot-master\node_modules\send\index.js:421:12)
at next (C:\Users\vikram\Downloads\techdot-master\node_modules\send\index.js:736:16)
at onstat (C:\Users\vikram\Downloads\techdot-master\node_modules\send\index.js:725:14)
at FSReqCallback.oncomplete (fs.js:166:21)

the thing is package.json file is not maintained properly, you can replace it by the following lines of code:-

{
  "name": "techdot",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "cookie-parser": "^1.4.5",
    "express": "^4.16.3",
    "morgan": "^1.10.0",
    "password-hash": "^1.2.2",
    "request": "^2.88.2",
    "solc": "^0.4.11",
    "web3": "^0.19.1"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/sanattaori/techdot.git"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/sanattaori/techdot/issues"
  },
  "homepage": "https://github.com/sanattaori/techdot#readme"
}

and then run :

npm install