ricardomansano / reactron

Aplicativo React+Electron com features de acesso ao File System e Rest
MIT License
60 stars 24 forks source link

Problema ao usar "npm start" para executar o projeto #2

Closed andrefelipeschulle closed 4 years ago

andrefelipeschulle commented 4 years ago

posso estar fazendo algo de errado más Gostei muito da ideia do seu projeto, Juntar o React e o Electron. você poderia me ajudar ?

➜ npm start     

> reactron@1.0.0 start /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron
> gulp

[10:36:48] Using gulpfile /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/gulpfile.js
[10:36:48] Starting 'default'...
[10:36:48] Starting 'start'...
[10:36:48] Starting 'watch'...
[10:36:48] Starting 'build'...
[10:36:48] Starting 'copy'...
[10:36:49] Finished 'watch' after 125 ms
[10:36:49] Finished 'copy' after 273 ms
[10:36:49] Starting 'html'...
[10:36:49] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/index.html reloaded.
[10:36:49] Finished 'html' after 161 ms
[10:36:49] Starting 'css'...
[10:36:49] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/index.css reloaded.
[10:36:49] Finished 'css' after 98 ms
[10:36:49] Starting 'js'...
[10:36:59] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/main.js reloaded.
[10:37:00] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/app.js reloaded.
[10:37:00] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/app.test.js reloaded.
[10:37:00] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/index.js reloaded.
[10:37:01] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/components/app-about.js reloaded.
[10:37:01] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/components/app-bar.js reloaded.
[10:37:01] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/components/app-button.js reloaded.
[10:37:01] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/components/app-menu.js reloaded.
[10:37:01] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/components/basic-form.js reloaded.
[10:37:02] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/components/command.js reloaded.
[10:37:02] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/components/fs_inifile.js reloaded.
[10:37:02] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/components/rest.js reloaded.
[10:37:02] /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/app/components/welcome.js reloaded.
[10:37:02] Finished 'js' after 13 s
[10:37:02] Finished 'build' after 14 s
[10:37:02] Starting '<anonymous>'...
[10:37:02] '<anonymous>' errored after 115 ms
[10:37:02] Error: exited with error code: 127
    at ChildProcess.onexit (/Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/node_modules/end-of-stream/index.js:40:36)
    at ChildProcess.emit (events.js:321:20)
    at ChildProcess.EventEmitter.emit (domain.js:547:15)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
[10:37:02] 'start' errored after 14 s
[10:37:02] 'default' errored after 14 s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactron@1.0.0 start: `gulp`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the reactron@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!     /Users/andrefelipeschulle/.npm/_logs/2020-02-20T13_37_02_667Z-debug.log
andrefelipeschulle commented 4 years ago

esse é o Log do erro salvo pelo NPM

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@6.13.7
3 info using node@v13.9.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle reactron@1.0.0~prestart: reactron@1.0.0
6 info lifecycle reactron@1.0.0~start: reactron@1.0.0
7 verbose lifecycle reactron@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle reactron@1.0.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron/node_modules/.bin:/Users/andrefelipeschulle/.zinit/polaris/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle reactron@1.0.0~start: CWD: /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron
10 silly lifecycle reactron@1.0.0~start: Args: [ '-c', 'gulp' ]
11 silly lifecycle reactron@1.0.0~start: Returned: code: 1  signal: null
12 info lifecycle reactron@1.0.0~start: Failed to exec start script
13 verbose stack Error: reactron@1.0.0 start: `gulp`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:321:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:321:20)
13 verbose stack     at maybeClose (internal/child_process.js:1026:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid reactron@1.0.0
15 verbose cwd /Volumes/Macbook Dados/BrainyLab/Desenvolvimento/Sibratec/reactron
16 verbose Darwin 19.3.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v13.9.0
19 verbose npm  v6.13.7
20 error code ELIFECYCLE
21 error errno 1
22 error reactron@1.0.0 start: `gulp`
22 error Exit status 1
23 error Failed at the reactron@1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
ricardomansano commented 4 years ago

Bom dia @andrefelipeschulle ,

Tive o mesmo erro montando o ambiente agora pela manha, só mudou a linha, estou com o npm 6.13.4

Deve ser algum colateral de alguma atualização, mas ai pode ser do npm, do guilp, da propria biblioteca end-of-stream

Essa é uma das coisas chatas do mundo JS/TS, o pessoal mexe nas próprias LIBs como se não houvesse amanhã, e ai as coisa parar de funcionar.

Quem conseguir achar o problema primeiro avisa o outro, se eu tiver tempo vou tentar brincar com isso no carnaval.

[08:59:18] /media/mansano/Novo volume/projs/reactron/app/components/welcome.js reloaded. [08:59:18] Finished 'js' after 1.07 s [08:59:18] Finished 'build' after 1.12 s [08:59:18] Starting ''... [08:59:18] '' errored after 8.28 ms [08:59:18] Error: exited with error code: 127 at ChildProcess.onexit (/media/mansano/Novo volume/projs/reactron/node_modules/end-of-stream/index.js:39:36) at ChildProcess.emit (events.js:198:13) at ChildProcess.EventEmitter.emit (domain.js:466:23) at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) [08:59:18] 'start' errored after 1.13 s [08:59:18] 'default' errored after 1.13 s npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! reactron@1.0.0 start: gulp npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the reactron@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! /home/mansano/.npm/_logs/2020-02-21T11_59_18_207Z-debug.log mansano@mansano-Precision-3541:/media/mansano/Novo volume/projs/reactron$

ricardomansano commented 4 years ago

Bom dia Andre,

Consegui analisar o problema, e por um coincidência cabalística caímos no mesmo ponto, meu diretório de projetos tinha ESPAÇO, exatamente como o seu (/Volumes/Macbook Dados/), ao clonar em um diretório sem espaços o projeto inicia.

Não sei ao certo se a culpa é do Electron ou de alguma LIB que usei no projeto, qdo tiver mais tranquilo vou tentar ver isso.

image

Abs

brunocferreira commented 1 year ago

Eu tive um problema ao usar o "npm start" e a aplicação inicializar uma tela em branco:

image

Os comandos vão até a linha do "Starting '\<anonymous>'..." e esta tela em branco é gerada.

Eu tentei mas não consegui resolver. Meu node está na versão 18.7.0 e o npm 8.16.0. Para clonar o repositório eu usei o GitHub Desktop.

ricardomansano commented 1 year ago

boa tarde @brunocferreira,

Voltei um package.json antigo e agora tá compilando, aceitei algum pull request de segurança que bagunçou o projeto. Baixa novamente e me fala se conseguiu compilar,

Valew