Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throw new TypeError('Router.use() requires a middleware function') #66

Open
TemeBirhanu opened this issue May 14, 2024 · 0 comments
Open

Comments

@TemeBirhanu
Copy link

something wrong with the use of router if you understand i need fast response
[nodemon] starting node server.js
D:\Program Files\Mern\exercise-tracker\backend\node_modules\express\lib\router\index.js:462
throw new TypeError('Router.use() requires a middleware function')
^

TypeError: Router.use() requires a middleware function
at Function.use (D:\Program Files\Mern\exercise-tracker\backend\node_modules\express\lib\router\index.js:462:11)
at Object. (D:\Program Files\Mern\exercise-tracker\backend\routes\users.js:4:8)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object. (D:\Program Files\Mern\exercise-tracker\backend\server.js:21:21)
at Module._compile (node:internal/modules/cjs/loader:1376:14)

Node.js v20.11.0
[nodemon] app crashed - waiting for file changes before starting...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant