npm安装电子错误-无法验证第一个证书

edqdpe6u  于 2022-12-27  发布在  其他
关注(0)|答案(1)|浏览(170)

我已经创建了一个应用程序目录。
第一个月
安装电子时使用下面的线
npm install electron --save-dev
低于误差

> core-js@3.9.0 postinstall C:\Users\BLUE\JavaScript\welcome_app\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

> electron@11.3.0 postinstall C:\Users\BLUE\JavaScript\welcome_app\node_modules\electron
> node install.js

RequestError: unable to verify the first certificate
    at ClientRequest.<anonymous> (C:\Users\BLUE\JavaScript\welcome_app\node_modules\got\source\request-as-event-emitter.js:178:14)
    at Object.onceWrapper (events.js:422:26)
    at ClientRequest.emit (events.js:327:22)
    at ClientRequest.origin.emit (C:\Users\BLUE\JavaScript\welcome_app\node_modules\@szmarczak\http-timer\source\index.js:37:11)
    at TLSSocket.socketErrorListener (_http_client.js:469:9)
    at TLSSocket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
npm WARN welcome_app@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@11.3.0 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@11.3.0 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:\Users\BLUE\AppData\Roaming\npm-cache\_logs\2021-02-24T23_44_06_772Z-debug.log

在将ssl限制设置为false后,我也尝试过这种方法,但仍然不起作用

相关问题