2
votes

here is my terminal :-

  • Q:\clone\node-cloudinary-instagram\node_modules\express\lib\router\route.js:202 throw new Error(msg);

    • Error: Route.get() requires a callback function but got a [object Undefined] at Route.(anonymous function) [as get] (Q:\clone\node-cloudinary-instagram\node_modules\express\lib\router\route.js:202:15) at Function.app.(anonymous function) [as get] (Q:\clone\node-cloudinary-instagram\node_modules\express\lib\application.js:482:19) at module.exports (Q:\clone\node-cloudinary-instagram\routes.js:4:9) at Object. (Q:\clone\node-cloudinary-instagram\server.js:19:20) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Function.Module.runMain (module.js:694:10)
    • npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: node server.js
    • npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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!
      C:\Users\Chetan
      Sharma\AppData\Roaming\npm-cache_logs\2019-03-21T00_16_50_000Z-debug.log

Here is my package.json file code

{
  "name": "scotch-cloudinary",
  "version": "1.0.0",
  "description": "Demo on how to use Cloudinary",
  "main": "server.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node server.js"
  },
  "keywords": [
    "Cloudinary"
  ],
  "author": "Christian Nwamba",
  "license": "MIT",
  "dependencies": {
    "body-parser": "^1.15.2",
    "cloudinary": "^1.13.2",
    "ejs": "^2.5.2",
    "express": "^4.14.0"
  }
}
1
Could you show your code? server.js:19:20hoangdv

1 Answers

0
votes

check here Q:\clone\node-cloudinary-instagram\server.js:19:20 (line 20)

Error: Route.get() requires a callback function but got a [object Undefined] at Route.

this is a hint ^^^