Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

系统环境:
WIN10 2004,
node v12.18.3
npm 6.14.6
按照官网教程执行到npm install --save-dev electron这一步的时候提示我

npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/electron failed, reason: self signed certificate in certificate chain

npm ERR! A complete log of this run can be found in:
npm ERR!     C:UserscrackAppDataRoaming
pm-cache\_logs2020-09-25T15_04_16_999Z-debug.log

通过百度说要禁用SSL?
然后我执行了npm set strict-ssl false
当我再次执行npm install --save-dev electron这个命令却收到提示:


> electron@10.1.2 postinstall D:mysqlapp
ode_moduleselectron
> node install.js

RequestError: self signed certificate in certificate chain
    at ClientRequest.<anonymous> (D:mysqlapp
ode_modulesgotsource
equest-as-event-emitter.js:178:14)
    at Object.onceWrapper (events.js:422:26)
    at ClientRequest.emit (events.js:327:22)
    at ClientRequest.origin.emit (D:mysqlapp
ode_modules@szmarczakhttp-timersourceindex.js:37:11)
    at TLSSocket.socketErrorListener (_http_client.js:426:9)
    at TLSSocket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
npm WARN mysqlapp@1.0.0 No description
npm WARN mysqlapp@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@10.1.2 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@10.1.2 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:UserscrackAppDataRoaming
pm-cache\_logs2020-09-25T15_09_58_844Z-debug.log

还是SSL的问题,请问这个该怎么解决???


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
378 views
Welcome To Ask or Share your Answers For Others

1 Answer

好吧,我发现了,杀软的问题解决了...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...