安装electorn 抛出异常,求解

来源:3-2 Electron告白程序(一)

XiaoShan_2016

2020-02-17 16:50

http://img1.mukewang.com/5e4a534c00018e4413370725.jpg

(node:2584) UnhandledPromiseRejectionWarning: HTTPError: Response code 404 (Not Found) for https://cdn.npm.taobao.org/dist/electron/v8.0.1/electron-v8.0.1-win32-x64.zip
    at EventEmitter.<anonymous> (D:\Programme\node-v12.14.1\node_global\node_modules\electron\node_modules\_got@9.6.0@got\source\as-stream.js:35:24)
    at EventEmitter.emit (events.js:223:5)
    at module.exports (D:\Programme\node-v12.14.1\node_global\node_modules\electron\node_modules\_got@9.6.0@got\source\get-response.js:22:10)
    at ClientRequest.handleResponse (D:\Programme\node-v12.14.1\node_global\node_modules\electron\node_modules\_got@9.6.0@got\source\request-as-event-emitter.js:155:5)
    at Object.onceWrapper (events.js:313:26)
    at ClientRequest.emit (events.js:228:7)
    at ClientRequest.origin.emit (D:\Programme\node-v12.14.1\node_global\node_modules\electron\node_modules\_@szmarczak_http-timer@1.1.2@@szmarczak\http-timer\source\index.js:37:11)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:583:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:115:17)
    at TLSSocket.socketOnData (_http_client.js:456:22)
(node:2584) 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:2584) [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.

写回答 关注

1回答

  • XiaoShan_2016
    2020-02-18 01:11:40

    在命令后面加上版本号即可以解决:cnpm install -g electron@5.0.6

N种语言实现4版本告白神器

0基础秒学告白神器,VBS版、前端版、Java版、小程序版,4款神器各取所需

5777 学习 · 202 问题

查看课程

相似问题