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

Erro no compilador

Estou com erro no npm run watch

renan@renan-Lenovo-ideapad-310-15ISK ~/projeto-webpack/client $ npm run watch

> client@1.0.0 watch /home/renan/projeto-webpack/client
> babel app-src -d app --source-maps --watch

/usr/bin/env: “node”: Arquivo ou diretório não encontrado

npm ERR! Linux 4.15.0-36-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "watch"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! client@1.0.0 watch: `babel app-src -d app --source-maps --watch`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the client@1.0.0 watch script 'babel app-src -d app --source-maps --watch'.
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!     babel app-src -d app --source-maps --watch
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!     /home/renan/projeto-webpack/client/npm-debug.log
3 respostas

Oi Renan, que estranho esse erro, você consegue me informar qual é a versão do Babel e do Webpack que tá usando? Estou quase certo que você precisa atualizar o node pra versão 6 ou 8 de preferência.

solução!

Era conflito de nomes entre node e nodejs, dependendo da distribuição do linux isso está acontecendo. Resolvi com o creationix/nvm. Obrigado!

Entendi, mudei a solução para sua resposta. Obrigado por compartilhar aqui!

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