nodemon app crashed – waiting for file changes before starting?

PS D:\PROGRAMMING\2077\SHOPIT> npm run dev

> shopit@1.0.0 dev D:\PROGRAMMING\2077\SHOPIT
> SET NODE_ENV=DEVELOPMENT& nodemon backend/server
  
> [nodemon] 2.0.7
> [nodemon] to restart at any time, enter `rs`
> [nodemon] watching path(s): *.*
> [nodemon] watching extensions: js,mjs,json
> [nodemon] starting `node backend/server.js`
> D:\PROGRAMMING\2077\SHOPIT\backend\routes\product.js:6
> router.routes('/products').get(getProducts);
       ^

> TypeError: router.routes is not a function
>   at Object.<anonymous> (D:\PROGRAMMING\2077\SHOPIT\backend\routes\product.js:6:8)
>   at Module._compile (internal/modules/cjs/loader.js:1063:30)
>   at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
>   at Module.load (internal/modules/cjs/loader.js:928:32)   
>   at Function.Module._load (internal/modules/cjs/loader.js:769:14)
>   at Module.require (internal/modules/cjs/loader.js:952:19)    at require >(internal/modules/cjs/helpers.js:88:18)       
>   at Object.<anonymous> (D:\PROGRAMMING\2077\SHOPIT\backend\app.js:8:18)
>   at Module._compile (internal/modules/cjs/loader.js:1063:30)
>   at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
>   [nodemon] app crashed - waiting for file changes before starting...

44 thoughts on “nodemon app crashed – waiting for file changes before starting?”

  1. Pingback: prednisone 60

Leave a Comment