Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I fix npm ERR! code ERR_SSL_CIPHER_OPERATION_FAILED when creating Electron or React app

I tried many solutions I found in the web, from reinstalling node js, installing the new openssl version, reinstalling git bash (console), allowed gitbash and nodejs through firewall, and even formatted the whole PC. Nothing worked,

Error below:

npm WARN exec The following package was not found and will be installed: [email protected]
npm ERR! code ERR_SSL_CIPHER_OPERATION_FAILED
npm ERR! 7C020000:error:1C800066:Provider routines:ossl_gcm_stream_update:cipher operation failed:c:\ws\deps\openssl\openssl\providers\implementations\ciphers\ciphercommon_gcm.c:320:
npm ERR!

after running it again I get this error:

module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);


TypeError: bind.call is not a function
    at Object.<anonymous> (C:\Users\Keba\AppData\Local\npm-cache\_npx\36f5f21e8c68ce75\node_modules\has\src\index.js:5:23)
    at Module._compile (node:internal/modules/cjs/loader:1275:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
    at Module.load (node:internal/modules/cjs/loader:1133:32)
    at Module._load (node:internal/modules/cjs/loader:972:12)
    at Module.require (node:internal/modules/cjs/loader:1157:19)
    at require (node:internal/modules/helpers:119:18)
    at Object.<anonymous> (C:\Users\Keba\AppData\Local\npm-cache\_npx\36f5f21e8c68ce75\node_modules\@electron-forge\cli\node_modules\is-core-module\index.js:3:11)
    at Module._compile (node:internal/modules/cjs/loader:1275:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)

Node.js v19.6.1

like image 762
Hussain AlAdraj Avatar asked Sep 16 '26 23:09

Hussain AlAdraj


1 Answers

For some reasons, some people can't connect to the registry via https. This can be fixed by setting npm config in terminal

npm config set strict-ssl false
like image 79
Trung Thai Dinh Avatar answered Sep 19 '26 04:09

Trung Thai Dinh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!