Home  >  Article  >  Web Front-end  >  npm install Electron fails due to slow network timeout

npm install Electron fails due to slow network timeout

小云云
小云云Original
2018-02-06 15:00:512582browse

The Electron framework, formerly known as Atom Shell, allows you to write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on io.js and Chromium open source projects. The editor encountered a situation where npm installed Electron failed due to slow network timeout. This article mainly shares an article to solve the problem of npm installing Electron causing slow network timeout and failed. It has a good reference value. ,I hope to be helpful. Let’s follow the editor to have a look.

1. If the npm source is too slow, you can switch the source to the domestic Taobao mirror.

npm config set registry https://registry.npm.taobao.org

2. Go to electron’s domestic mirror to download the latest installation package, mainly focusing on the version corresponding to your system

https://npm.taobao.org/mirrors/electron

3. Place the downloaded package into the .electron folder in the root directory of the current user. Windows is usually

C:\Users\YourUserName\.electron

4. Execute the installation command npm install electron-prebuilt -g

Related recommendations:

Electron builds React, Webpack desktop application tutorial

Webpack actual construction Electron application example detailed explanation

electron uses html js css to develop desktop under Windows Application_html/css_WEB-ITnose

The above is the detailed content of npm install Electron fails due to slow network timeout. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn