zoukankan      html  css  js  c++  java
  • 安装Electron时报错command sh -c node install.js,如何处理

    最近在安装Electron时报以下错误:

    505 error code 1
    506 error path /Users/**/04sendSms/node_modules/electron
    507 error command failed
    508 error command sh -c node install.js
    509 error RequestError: read ETIMEDOUT
    509 error     at ClientRequest.<anonymous> (/Users/**/04sendSms/node_modules/got/source/request-as-event-emitter.js:178:14)
    509 error     at Object.onceWrapper (node:events:514:26)
    509 error     at ClientRequest.emit (node:events:406:35)
    509 error     at ClientRequest.origin.emit (/Users/**/04sendSms/node_modules/@szmarczak/http-timer/source/index.js:37:11)
    509 error     at TLSSocket.socketErrorListener (node:_http_client:447:9)
    509 error     at TLSSocket.emit (node:events:394:28)
    509 error     at emitErrorNT (node:internal/streams/destroy:157:8)
    509 error     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    509 error     at processTicksAndRejections (node:internal/process/task_queues:83:21)
    510 verbose exit 1

    查找资料解决方法如下:

    在安装的时候添加一个参数--ignore-scripts

      --ignore-scripts表示npm将不会运行在package.json中指定的scripts脚本

    npm install --save-dev electron --ignore-scripts
  • 相关阅读:
    什么是内存碎片
    java堆内存模型
    java内存模型
    java垃圾回收过程
    找出给定的一个字符串中最长的不重复子串,不重复子串即一个子串中不出现两个相同的字符
    学习tomcat(八)
    学习Redis(二)
    学习k8s(四)
    学习docker(三)
    学习MySql(一)
  • 原文地址:https://www.cnblogs.com/dzlishen/p/15478732.html
Copyright © 2011-2022 走看看