instalando o elétron através do erro npm [duplicado]

0

Eu estava tentando instalar o Electron usando o NPM, e isso apareceu:

adi@LMToshi2 ~ $ npm install electron --save-dev --save-exact
npm ERR! Linux 4.8.0-53-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "electron" "-
-save-dev" "--save-exact"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read

npm ERR! network read ECONNRESET
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm ERR! Linux 4.8.0-53-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "electron" "--save-dev" "--save-exact"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read

npm ERR! network read ECONNRESET
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm ERR! Linux 4.8.0-53-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "electron" "--save-dev" "--save-exact"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read

npm ERR! network read ECONNRESET
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
WARN engine [email protected]: wanted: {"node":">=4.5.0"} (current: {"node":"4.2.6","npm":"3.5.2"})

BTW: não estou em um proxy.

    
por Alab Maiken Melendres 15.04.2018 / 16:43

1 resposta

1

Verifique se você tem a última versão do Node instalada! sudo apt install node não instala a versão mais recente, parece que você tem a versão 4.2.6 e o elétron quer algo mais novo ou igual à versão 4.5.0. Tente instalar o nó com este método:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

digite:

sudo apt-get install -y nodejs

(Fonte: link )

    
por Nathan Laha 17.04.2018 / 02:12