electron / electron-api-demos

Explore the Electron APIs
http://electronjs.org/#get-started
MIT License
10.25k stars 2.12k forks source link

Errors in npm install on Windows 7 #288

Open mraak opened 7 years ago

mraak commented 7 years ago

E:\dev\projects\nodeprojects\electron\electron-api-demos>npm i

electron-chromedriver@1.4.1 install E:\dev\projects\nodeprojects\electron\electron-api-demos\node_modul es\electron-chromedriver node ./download-chromedriver.js

E:\dev\projects\nodeprojects\electron\electron-api-demos\node_modules\electron-chromedriver\download-chro medriver.js:16 if (error != null) throw error ^

Error: self signed certificate in certificate chain at Error (native) at TLSSocket. (_tls_wrap.js:1079:38) at emitNone (events.js:86:13) at TLSSocket.emit (events.js:185:7) at TLSSocket._finishInit (_tls_wrap.js:603:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:433:38) npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\n pm-cli.js" "i" npm ERR! node v6.9.4 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE

npm ERR! electron-chromedriver@1.4.1 install: node ./download-chromedriver.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the electron-chromedriver@1.4.1 install script 'node ./download-chromedriver.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the electron-chromedriver package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./download-chromedriver.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs electron-chromedriver npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls electron-chromedriver npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! E:\dev\projects\nodeprojects\electron\electron-api-demos\npm-debug.log

madneal commented 7 years ago

:+1: A similar error when execute npm install, the OS is windows 10, the node version is 6.9.2

C:\Users\neal1\project\electron-api-demos\node_modules.1.6.0@electron-chromedriver\download-chromedriver.js:16 if (error != null) throw error ^

Error: Generated checksum for "chromedriver-v2.21-win32-x64.zip" did not match expected checksum. at ChecksumMismatchError.Error (native) at ChecksumMismatchError.ErrorWithFilename (C:\Users\neal1\project\electron-api-demos\node_modules.1.3.1@sumchecker\build.js:41:124) at new ChecksumMismatchError (C:\Users\neal1\project\electron-api-demos\node_modules.1.3.1@sumchecker\build.js:56:133) at Hash. (C:\Users\neal1\project\electron-api-demos\nodemodules.1.3.1@sumchecker\build.js:203:22) at emitNone (events.js:86:13) at Hash.emit (events.js:185:7) at emitReadable (_stream_readable.js:432:10) at emitReadable (_stream_readable.js:426:7) at readableAddChunk (_stream_readable.js:187:13) at Hash.Readable.push (_stream_readable.js:134:10) Error: post install error, please remove node_modules before retry! Run "C:\Windows\system32\cmd.exe /d /s /c node ./download-chromedriver.js" error, exit code 1 at ChildProcess.proc.on.code (C:\Users\neal1\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:67:21) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:877:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) npminstall version: 2.16.0

mraak commented 7 years ago

My solution was to run this first.

npm config set strict-ssl false

And proceed with the normal install.

Mike-Dax commented 7 years ago

I am having the same error as @neal1991 on Windows 10

codebytere commented 6 years ago

Does this still occur on recent versions?

Nditah commented 6 years ago

# Error on Starting Electron-Api-Demos

PS C:\Users\UserPC\Project\Electron\electron-api-demos> npm start

ElectronAPIDemos@1.3.0 start C:\Users\UserPC\Project\Electron\electron-api-demos electron .

C:\Users\UserPC\Project\Electron\electron-api-demos\node_modules\electron\index.js:9 throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again') ^

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again at Object. (C:\Users\UserPC\Project\Electron\electron-api-demos\node_modules\electron\index.js:9:9) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users\UserPC\Project\Electron\electron-api-demos\node_modules\electron\cli.js:3:16) at Module._compile (module.js:570:32) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ElectronAPIDemos@1.3.0 start: electron . npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ElectronAPIDemos@1.3.0 start 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\UserPC\AppData\Roaming\npm-cache_logs\2018-04-22T09_53_42_103Z-debug.log

codebytere commented 6 years ago

@Nditah what happens when you follow the instructions?

Nditah commented 6 years ago

@codebytere , I followed the instruction and its resolved. Nice !!