• Electron 初始化


    mkdir my-electron-app && cd my-electron-app
    npm init -y
    npm i --save-dev electron

    npm install.js 报错

    > electron@12.0.7 postinstall D:javascriptplaybill
    ode_moduleselectron
    > node install.js
    
    RequestError: read ECONNRESET
        at ClientRequest.<anonymous> (D:javascriptplaybill
    ode_modulesgotsource
    equest-as-event-emitter.js:178:14)
        at Object.onceWrapper (events.js:421:26)
        at ClientRequest.emit (events.js:326:22)
        at ClientRequest.origin.emit (D:javascriptplaybill
    ode_modules@szmarczakhttp-timersourceindex.js:37:11)
        at TLSSocket.socketErrorListener (_http_client.js:469:9)
        at TLSSocket.emit (events.js:314:20)
        at emitErrorNT (internal/streams/destroy.js:100:8)
        at emitErrorCloseNT (internal/streams/destroy.js:68:3)
        at processTicksAndRejections (internal/process/task_queues.js:80:21)
    npm WARN playbill@1.0.0 No description
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! electron@12.0.7 postinstall: `node install.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the electron@12.0.7 postinstall script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:UsersAdministratorAppDataRoaming
    pm-cache\_logs2021-05-09T12_40_24_916Z-debug.log

    解决方案:

    npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver

    DEMO

    https://github.com/electron/electron/tree/v12.0.6/docs/fiddles/quick-start
  • 相关阅读:
    设计模式:简单工厂模式
    datav轮播表使用事例
    POI操作Excel常用方法总结 .
    序列图像三维重建 学习过程流水账
    python面向对象编程
    python批量生成word文档
    Linux 网络配置方法 nmtui 配置
    leetcode 剑指 Offer 67. 把字符串转换成整数 & leetcode 8. 字符串转换整数 (atoi)
    leetcode 剑指 Offer 59
    leetcode 剑指 Offer 53
  • 原文地址:https://www.cnblogs.com/rubekid/p/14748909.html
Copyright © 2020-2023  润新知