Установка электрона через ошибку npm
Я пытался установить Electron с помощью NPM, и это обнаружилось:
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 hawk@6.0.2: wanted: {"node":">=4.5.0"} (current: {"node":"4.2.6","npm":"3.5.2"})
Кстати: я не в прокси.
1 ответ
Убедитесь, что у вас установлена последняя версия Node! sudo apt install node
не устанавливает последнюю версию, похоже, у вас версия 4.2.6, а электронщик хочет что-то более новое или равное версии 4.5.0. Попробуйте установить узел с помощью этого метода:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
затем введите:
sudo apt-get install -y nodejs
(Источник: https://nodejs.org/en/download/package-manager/)