• 安装ELectron失败解决方案


    npm安装Electron解决方案

    Electron使用npm安装时,因为是国外的镜像源,所以速度会非常慢。而使用cnpm如下命令进行安装时,又会出现安装失败的问题:

    npm install electron -g
    execute post install 1 scripts...
    [1/1] scripts.postinstall electron@6.0.3 run "node install.js", root: "C:\Users\94012\AppData\Roaming\npm\node_modules\electron"
    Downloading tmp-1428-0-electron-v6.0.3-win32-x64.zip
    Error: GET https://cdn.npm.taobao.org/dist/electron/6.0.3/electron-v6.0.3-win32-x64.zip returned 404
    C:Users94012AppDataRoaming
    pm
    ode_moduleselectroninstall.js:49
      throw err
      ^
      ......
    Error: Failed to find Electron v6.0.3 for win32-x64 at https://cdn.npm.taobao.org/dist/electron/6.0.3/electron-v6.0.3-win32-x64.zip
        at Request.<anonymous> 
    

    [npminstall:runscript:error] electron@6.0.3 scripts.postinstall run "node install.js" error: RunScriptError: Run "C:Windowssystem32cmd.exe /d /s /c node install.js" error, exit code 1
    Install fail! RunScriptError: post install error, please remove node_modules before retry!
    Run "C:Windowssystem32cmd.exe /d /s /c node install.js" error, exit code 1
    RunScriptError: post install error, please remove node_modules before retry!
    Run "C:Windowssystem32cmd.exe /d /s /c node install.js" error, exit code 1
    at ChildProcess.proc.on.code
    ......

    从报错原因上,发现是找不到这个版本的electron,然后返回404了。

    Downloading tmp-1428-0-electron-v6.0.3-win32-x64.zip
    Error: GET https://cdn.npm.taobao.org/dist/electron/6.0.3/electron-v6.0.3-win32-x64.zip returned 404
    

    所以找到原因就好说了,那就指定之前的版本安装即可,如:

    cnpm install electron@^6.0.1 -g
    
  • 相关阅读:
    Large-Margin Softmax Loss for Convolutional Neural Networks
    Selective Kernel Network
    A Discriminative Feature Learning Approach for Deep Face Recognition
    recurrent model for visual attention
    rethinking imageNet pre-training
    字符串格式化输出
    HeatMap
    Numpy 多维数组简介
    浅谈JVM(下)
    java线程池总结
  • 原文地址:https://www.cnblogs.com/korea/p/11913966.html
Copyright © 2020-2023  润新知