1
resposta

Erro após adicionar o "start": "concurrently ...."

após adicionar

    "watch": "tsc -w",
      "server": "lite-server --baseDir=app",
        "start": "concurrently \"npm run watch\" \"npm run server\""

Estou tendo esse erro ao tentar rodar npm start conforme o instrutor o faz:

C:\Angular\Alura-Angular\alurabank>npm start

> alurabank@1.0.0 start C:\Angular\Alura-Angular\alurabank
> concurrently "npm run watch" "npm run server"      

 Error occured when executing command: npm run server Error: spawn cmd.exe ENOENT
     at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
     at onErrorNT (internal/child_process.js:465:16) 
     at processTicksAndRejections (internal/process/task_queues.js:80:21)
 Error occured when executing command: npm run server Error: spawn cmd.exe ENOENT
     at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
     at onErrorNT (internal/child_process.js:465:16) 
     at processTicksAndRejections (internal/process/task_queues.js:80:21)
[1] npm run server exited with code -4058
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! alurabank@1.0.0 start: `concurrently "npm run watch" "npm run server"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the alurabank@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\Mrbonze\AppData\Roaming\npm-cache\_logs\2021-02-25T15_22_24_878Z-debug.log

Alguém passou por isso? Pode me ajudar?

1 resposta

Fala ai Bleny, tudo bem? Nunca tinha visto esse problema ainda com concurrently, dando uma pesquisada aqui a galera fala que pode ser variáveis de ambiente no Windows:

Espero ter ajudado.