Oie! Espero que estejam todos saudaveis! Estou adaptando esse projeto para um outro que estou criando, mas estou tendo os erros seguintes para executar a API. Eu pesquisei e testei algumas coisas, mas parece que os erros tem a ver com a versao do express (?), porem a minha eh a mesma do instrutor, "express": "^4.17.1"
Thanks!!!!
C:\Users\janam\OneDrive\Área de Trabalho\API\node_modules\express\lib\router\index.js:458
throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn)) ^
TypeError: Router.use() requires a middleware function but got a Object
at Function.use (C:\Users\janam\OneDrive\Área de Trabalho\API\node_modules\express\lib\router\index.js:458:13)
at Function.<anonymous> (C:\Users\janam\OneDrive\Área de Trabalho\API\node_modules\express\lib\application.js:220:21)
at Array.forEach (<anonymous>)
at Function.use (C:\Users\janam\OneDrive\Área de Trabalho\API\node_modules\express\lib\application.js:217:7)
at Object.<anonymous> (C:\Users\janam\OneDrive\Área de Trabalho\API\api\index.js:9:5)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)