Electron 7.x or later installation prompts error Solution

To upgrade to the latest Electron 7.x or later, running tips electron does not exist, in fact, because when the electron install the corresponding platform executable file is not downloaded successfully, the following error message:

(node:18000) UnhandledPromiseRejectionWarning: Error: EPERM: operation not permitted, lstat 'C:\Users\JUNCHU~1\AppData\Local\Temp\electron-download-4VfCX9\electron-v7.1.7-win32-x64.zip'
(node:18000) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:18000) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm WARN smartoffice@0.1.47 No repository field.

In the official Git Issues to find a solution is to modify the image using another Taobao address. Excuting an order:

npm config set ELECTRON_MIRROR=https://cdn.npm.taobao.org/dist/electron/

 

Guess you like

Origin www.cnblogs.com/junchu25/p/12166213.html