Home > Web Front-end > JS Tutorial > body text

Failure to install Electron using npm

亚连
Release: 2018-06-07 15:13:09
Original
2298 people have browsed it

Below I will share with you an article to solve the problem of slow network timeout and failure of npm installation of Electron. It has a good reference value and I hope it will be helpful to everyone.

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 npm installation of Electron that failed due to slow network timeout. Let's take 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. Download the latest installation from the domestic image of electron package, mainly focus on the version corresponding to your system

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

##3. Download Good packages are placed in the .electron folder in the root directory of the current user. Windows is generally

C:\Users\YourUserName\.electron

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

The above is what I compiled for you. I hope it will be helpful to you in the future.

Related articles:

Implementing date selection component in vue mobile terminal

How to use iconfont font icon in webpack

How to package specified JS files separately in webpack

The above is the detailed content of Failure to install Electron using npm. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template