Erro ao rodar pela primeira vez o script npm start | Fórum | School of Net

Deseja poder participar de nosso fórum e tirar todas as suas dúvidas?
Clique aqui e assine nosso plano de acesso ilimitado. Saiba mais.

por Wardes Thiago

1 mês, 1 semana atrás Wardes Thiago

Erro ao rodar pela primeira vez o script npm start

Bom dia, o seguinte erro surge, o que pode ser? Agradeço qq resposta ``` [nodemon] starting `babel-node index.js` C:\Users\warde\OneDrive\Documentos\DEV_API_JS\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\warde\OneDrive\Documentos\DEV_API_JS\node_modules\express\lib\router\index.js:458:13) at Function.<anonymous> (C:\Users\warde\OneDrive\Documentos\DEV_API_JS\node_modules\express\lib\application.js:220:21) at Array.forEach (<anonymous>) at Function.use (C:\Users\warde\OneDrive\Documentos\DEV_API_JS\node_modules\express\lib\application.js:217:7) at exports.default (C:/Users/warde/OneDrive/Documentos/DEV_API_JS/routes.js:3:9) at Object.<anonymous> (C:/Users/warde/OneDrive/Documentos/DEV_API_JS/index.js:18:1) at Module._compile (internal/modules/cjs/loader.js:701:30) at loader (C:\Users\warde\OneDrive\Documentos\DEV_API_JS\node_modules\babel-register\lib\node.js:144:5) at Object.require.extensions.(anonymous function) [as .js] (C:\Users\warde\OneDrive\Documentos\DEV_API_JS\node_modules\babel-register\lib\node.js:154:7) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Function.Module.runMain (internal/modules/cjs/loader.js:754:12) at Object.<anonymous> (C:\Users\warde\OneDrive\Documentos\DEV_API_JS\node_modules\babel-cli\lib\_babel-node.js:154:22) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) ```

5 Respostas