为了账号安全,请及时绑定邮箱和手机立即绑定

安装electorn 抛出异常,求解

http://img1.sycdn.imooc.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 回答

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

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
N种语言实现4版本告白神器
  • 参与学习       5777    人
  • 解答问题       202    个

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

进入课程

安装electorn 抛出异常,求解

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信