Solucionado (ver solução)
Solucionado
(ver solução)
8
respostas

Erro ao rodar o npm start no diretório client

Ao digitar o comando npm start dentro da pasta client para compilar ele dá o seguinte erro:

Microsoft Windows [versão 6.1.7601] Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.

C:\Users\Osvaldo\Desktop\01-alurapic\alurapic\client>npm start

client@1.0.0 start C:\Users\Osvaldo\Desktop\01-alurapic\alurapic\client npm run tsc:w

client@1.0.0 tsc:w C:\Users\Osvaldo\Desktop\01-alurapic\alurapic\client tsc -w

'tsc' não é reconhecido como um comando interno ou externo, um programa operável ou um arquivo em lotes.

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js" "run" "tsc:w" npm ERR! node v6.9.1 npm ERR! npm v3.10.8 npm ERR! code ELIFECYCLE npm ERR! client@1.0.0 tsc:w: tsc -w npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the client@1.0.0 tsc:w script 'tsc -w'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the client package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! tsc -w npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs client npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls client npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\Osvaldo\Desktop\01-alurapic\alurapic\client\npm-debug.log

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js" "start" npm ERR! node v6.9.1 npm ERR! npm v3.10.8 npm ERR! code ELIFECYCLE npm ERR! client@1.0.0 start: npm run tsc:w npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the client@1.0.0 start script 'npm run tsc:w'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the client package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run tsc:w npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs client npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls client npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\Osvaldo\Desktop\01-alurapic\alurapic\client\npm-debug.log

C:\Users\Osvaldo\Desktop\01-alurapic\alurapic\client>

8 respostas
solução!

No vídeo e na explicação, executo o comando npm install antes. Sem ele o typescript não será instalado e o comando que você rodou falhará.

Osvaldo, aguardamos seu retorno.

Ainda aguardamos seu retorno.

Eu estava com esse mesmo erro, e pra mim funcionou, Flavio. Obrigado

Obrigado por avisar Ramir!

Também tive esse mesmo erro, e funcionou! Obrigado Flavio!!!!

Estou com um erro parecido no linux(ubuntu). Estou usando a alternativa de rodar apenas tsc -w único modo que funcionou, alguém tem uma solução para que funcione o npm start?

Seu Ubuntu deve estar com o binário do node renomeado para nodejs e isso dará problema no npm start. É um problema de instalação. A solução é você criar um atalho para o binário nodejs chamado node. Aliás, essa hipótese é apenas se o seu binário se chamar nodejs.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software