Set up electron mirror

1. Enter the following configuration in the terminal:

npm config set registry=https://registry.npmmirror.com
npm config set disturl=https://registry.npmmirror.com/-/binary/node

npm config set electron_mirror=https://registry.npmmirror.com/-/binary/electron/

Note: The version of node cannot be too high. When I used version v18.16.0, it would prompt that some configuration items of npm had been cancelled, so I later used version v16.16.0
2. After setting up the domestic image, download it with npm:

npm install electron --save-dev

Guess you like

Origin blog.csdn.net/qq_43651168/article/details/131091735