1
resposta

TypeError: express is not a function

Ao executar npm start, ocorre o seguinte erro:

,app = express()
           ^

TypeError: express is not a function
    at Object.<anonymous> (C:\Users\bruno.scosta\Documents\projects\alurabank\api\config\express.js:4:12)
    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> (C:\Users\bruno.scosta\Documents\projects\alurabank\api\server.js:2:12)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)        
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app@1.0.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app@1.0.0 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\bruno.scosta\AppData\Roaming\npm-cache\_logs\2021-03-19T16_50_44_975Z-debug.log
1 resposta

Fala ai Bruno, tudo bem? Como está o código de configuração do express? Consegue compartilhá-lo completo?

Fico no aguardo.