安装项目的时候老是报错:Command failed.

我在执行yarn 安装依赖的时候一直提示这个错误

error E:\theia\node_modules\electron: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: E:\theia\node_modules\electron
Output:
RequestError: socket hang up
    at ClientRequest.<anonymous> (E:\theia\node_modules\got\source\request-as-event-emitter.js:178:14)
    at Object.onceWrapper (events.js:421:26)
    at ClientRequest.emit (events.js:326:22)
    at ClientRequest.origin.emit (E:\theia\node_modules\@szmarczak\http-timer\source\index.js:37:11)
    at TLSSocket.socketOnEnd (_http_client.js:458:9)

解决

终端执行 npm config set electron_mirror https://npm.taobao.org/mirrors/electron/就能正常运行了

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容